Skip to main content

Snapshots object schema

The snapshots object allows you to query information about all snapshots in a given job.

Arguments

When querying for snapshots, the following arguments are available.

Fetching data...

Below we show some illustrative example queries and outline the schema of the snapshots object.

Example query

The database, schema, and identifier arguments are optional. This means that with this endpoint you can:

  • Find a specific snapshot by providing <database>.<schema>.<identifier>
  • Find all of the snapshots in a database and/or schema by providing <database> and/or <schema>

Find snapshots information for a job

The example query returns information about all snapshots in this job.

{
job(id: 123) {
snapshots {
uniqueId
name
executionTime
environmentId
executeStartedAt
executeCompletedAt
}
}
}

Fields

When querying for snapshots, the following fields are available:

FieldTypeDescription
accountIdBigInt!The unique ID of the account in dbt Cloud that this node was generated for
aliasStringThe alias of this snapshot
childrenL1[String!]!The list of nodes that depend on this snapshot
columns[CatalogColumn!]The columns of this snapshot
commentStringThe comment on this snapshot
compileCompletedAtDateTimeThe ISO timestamp when the snapshot compilation started
compileStartedAtDateTimeThe ISO timestamp when the snapshot compilation started
compiledCodeStringThe compiled code of this snapshot
compiledSqlStringThe compiled sql of this snapshot
databaseStringThe database this snapshot is defined in
dbtVersionStringThe version of dbt used to produce this node
descriptionStringThe user-supplied description for this node
environmentIdBigInt!The unique ID of the account in dbt Cloud that this node was generated for
errorStringThe error message if there was an error, otherwise null
executeCompletedAtDateTimeThe ISO timestamp when the snapshot execution completed
executeStartedAtDateTimeThe ISO timestamp when the snapshot execution started
executionTimeFloatThe total time elapsed during the execution of this snapshot
jobIdBigInt!The unique ID of the account in dbt Cloud that this node was generated for
metaJSONObjectThe key-value store containing metadata relevant to this node
nameStringThe user-supplied name of this particular node
ownerStringThe owner of this snapshot
packageNameStringThe package name of this snapshot
parentsModels[ModelNode!]!Retrieve parents information.
parentsSources[SourceNode!]!Retrieve parents source information.
projectIdBigInt!The unique ID of the account in dbt Cloud that this node was generated for
rawCodeStringThe raw code of this snapshot
rawSqlStringThe raw sql of this snapshot
resourceTypeString!The resource type of this node
runElapsedTimeFloatThe elapsed time of the specific run step (dbt run) that generated this snapshot node
runGeneratedAtDateTimeThe timestamp when the run step (dbt run) was completed, ISO formatted timestamp
runIdBigInt!The unique ID of the account in dbt Cloud that this node was generated for
schemaStringThe schema this snapshot is defined in
skipBooleanTrue if this snapshot was skipped, otherwise false
stats[CatalogStat!]!The stats of this snapshot
statusStringThe database-reported status of this snapshot
tags[String!]The tags associated with this node
threadIdStringThe thread that ran the execution of this snapshot
typeStringThe type of this snapshot
uniqueIdString!The unique ID of this node
0
Loading