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:
Field | Type | Description |
accountId | BigInt! | The unique ID of the account in dbt Cloud that this node was generated for |
alias | String | The alias of this snapshot |
childrenL1 | [String!]! | The list of nodes that depend on this snapshot |
columns | [CatalogColumn!] | The columns of this snapshot |
comment | String | The comment on this snapshot |
compileCompletedAt | DateTime | The ISO timestamp when the snapshot compilation started |
compileStartedAt | DateTime | The ISO timestamp when the snapshot compilation started |
compiledCode | String | The compiled code of this snapshot |
compiledSql | String | The compiled sql of this snapshot |
database | String | The database this snapshot is defined in |
dbtVersion | String | The version of dbt used to produce this node |
description | String | The user-supplied description for this node |
environmentId | BigInt! | The unique ID of the account in dbt Cloud that this node was generated for |
error | String | The error message if there was an error, otherwise null |
executeCompletedAt | DateTime | The ISO timestamp when the snapshot execution completed |
executeStartedAt | DateTime | The ISO timestamp when the snapshot execution started |
executionTime | Float | The total time elapsed during the execution of this snapshot |
jobId | BigInt! | The unique ID of the account in dbt Cloud that this node was generated for |
meta | JSONObject | The key-value store containing metadata relevant to this node |
name | String | The user-supplied name of this particular node |
owner | String | The owner of this snapshot |
packageName | String | The package name of this snapshot |
parentsModels | [ModelNode!]! | Retrieve parents information. |
parentsSources | [SourceNode!]! | Retrieve parents source information. |
projectId | BigInt! | The unique ID of the account in dbt Cloud that this node was generated for |
rawCode | String | The raw code of this snapshot |
rawSql | String | The raw sql of this snapshot |
resourceType | String! | The resource type of this node |
runElapsedTime | Float | The elapsed time of the specific run step (dbt run) that generated this snapshot node |
runGeneratedAt | DateTime | The timestamp when the run step (dbt run) was completed, ISO formatted timestamp |
runId | BigInt! | The unique ID of the account in dbt Cloud that this node was generated for |
schema | String | The schema this snapshot is defined in |
skip | Boolean | True if this snapshot was skipped, otherwise false |
stats | [CatalogStat!]! | The stats of this snapshot |
status | String | The database-reported status of this snapshot |
tags | [String!] | The tags associated with this node |
threadId | String | The thread that ran the execution of this snapshot |
type | String | The type of this snapshot |
uniqueId | String! | The unique ID of this node |
0