Source object schema
The source object allows you to query information about a particular source in a given job.
Arguments
When querying for a source
, the following arguments are available.
Field | Type | Required? | Description |
uniqueId | String! | Yes | No description provided |
Below we show some illustrative example queries and outline the schema of the source object.
Example query
The query below pulls relevant information about a given source. For instance, you can view the load time and the state (pass, fail, error) of that source.
{
job(id: 123) {
source(uniqueId: "source.jaffle_shop.snowplow.event") {
uniqueId
sourceName
name
state
maxLoadedAt
criteria {
warnAfter {
period
count
}
errorAfter {
period
count
}
}
maxLoadedAtTimeAgoInS
}
}
}
Fields
When querying for a source
, 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 |
childrenL1 | [String!]! | The list of nodes that depend on this source |
columns | [CatalogColumn!] | The columns of this source |
comment | String | The comment on this source |
criteria | Criteria! | The freshness SLA specified for this source table |
database | String | The database this source 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 |
freshnessChecked | Boolean | Whether or not the freshness was checked |
identifier | String | The identifier of this table/view |
jobId | BigInt! | The unique ID of the account in dbt Cloud that this node was generated for |
loader | String | The loader of this source |
maxLoadedAt | DateTime | The max value in the designated "loaded_at" column for this source table. ISO formatted timestamp |
maxLoadedAtTimeAgoInS | Float | The delta (in seconds) between max_loaded_at and snapshotted_at |
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 source |
projectId | BigInt! | The unique ID of the account in dbt Cloud that this node was generated for |
resourceType | String! | The resource type of this node |
runElapsedTime | Float | The elapsed time of the specific run step (dbt source snapshot-freshness) that generated this source node |
runGeneratedAt | DateTime | The timestamp when the run step (dbt source snapshot-freshness) 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 source is defined in |
snapshottedAt | DateTime | The time when this source was checked for freshnesses by dbt. ISO formatted timestamp |
sourceDescription | String | The user-supplied description for this source |
sourceName | String | The logical name of this source |
state | FreshnessStatus | The state of the freshness check for this source. Can be one of null, "pass", "fail", or "error". A value of null indicates that there was no freshness check. |
stats | [CatalogStat!]! | The stats of this source |
tags | [String!] | The tags associated with this node |
tests | [TestNode!]! | Retrieve test information. |
type | String | The type of this source |
uniqueId | String! | The unique ID of this node |
0