Skip to main content

Models object schema

Models are the foundational dbt resource that transform raw data into curated datasets using SQL (or Python). Each model represents a single SELECT statement, typically materialized as a table or view in your warehouse. You can query information about models through the Discovery API.

The Example query illustrates a few fields you can query with the models object. Refer to Fields to view the entire schema, which provides all possible fields you can query.

Arguments

When querying for models, you can use the following arguments:

Fetching data...

Example query

You can specify the environmentId to return model information for all models in the given environment, including their metadata, configuration, tests, and ownership details, limited to the first 100 results:

query {
environment(id: 834) {
applied {
models (first: 100) {
edges {
node {
name
description
access
accountId
catalog {
owner
}
config
environmentId
tests {
name
description
}
}
}
}
}
}
}

Fields

When querying for models, you can use the following fields:

Fetching data...

Key fields from nodes

Fetching data...

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0