ποΈ dbt_project.yml ContextThe compilation context of the dbt_project.yml file is well-defined as
ποΈ debugThe debug macro is new in dbt v0.14.1, and is only intended to be used in a development context with dbt. Do not deploy code to production which uses the debug macro.
ποΈ docThe doc function is used to reference docs blocks in the description field of schema.yml files. It is analogous to the ref function. For more information, consult the Documentation guide.
ποΈ env_varThe envvar function can be used to incorporate Environment Variables from the system into your dbt project. This envvar function can be used in your profiles.yml file, the dbtproject.yml file, the sources.yml file, your schema.yml files, and in model .sql files. Essentially envvar is available anywhere dbt processes jinja code.
ποΈ exceptionsThe exceptions namespace can be used to raise warnings and errors in dbt userspace.
ποΈ fromjsonThe fromjson context method can be used to deserialize a json string into a Python object primitive, eg. a dict or list.
ποΈ fromyamlThe fromyaml context method can be used to deserialize a yaml string into a Python object primitive, eg. a dict or list.
ποΈ modulesThe modules variable in the Jinja context contains useful Python modules for operating on data.
ποΈ on-run-end ContextThese variables are only available in the context for on-run-end hooks. They will evaluate to none if used outside of an on-run-end hook!
ποΈ profiles.yml ContextThe following context variables and methods are available when configuring
ποΈ run_queryThe run_query macro provides a convenient way to run queries and fetch their results. It is a wrapper around the statement block, which is more flexible, but also more complicated to use.
ποΈ run_started_atrunstartedat outputs the timestamp that this run started, e.g. 2017-04-21 0145.678.
ποΈ schemaThe schema that the model is configured to be materialized in. This is typically the same as model['schema'].
ποΈ schemasschemas is a variable available in an on-run-end hook, representing a list of schemas that dbt built objects in on this run.
ποΈ statement blocksstatements are sql queries that hit the database and return results to your Jinja context. Hereβs an example of a statement which gets all of the states from a users .
ποΈ tojsonThe tojson context method can be used to serialize a Python object primitive, eg. a dict or list to a JSON string.
ποΈ toyamlThe toyaml context method can be used to serialize a Python object primitive, eg. a dict or list to a yaml string.