About the info_schema macro
{{ info_schema('<view_name>') }} is the supported way to reference dbt Information Schema tables in a check or with dbt show --inline.
When you pass the name of the view you want to query (for example, {{ info_schema('models') }}), the macro reads from a logical view layer built at parse time.
For example, to find models without a description:
select name
from {{ info_schema('models') }}
where description = ''
For the full list of columns available for each view, refer to Columns available for checks.
Checks can only access parse-time project metadata. Only views whose columns are fully populated at parse time are available. Passing a view name that doesn't exist or isn't available at parse time causes the check to fail with a message listing what is available.
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.