Menu
dbt LogoDocsReferencedbt CLIdbt CloudFAQs
Learn
  • Getting Started Tutorial
  • Online Courses
  • Live Courses
Community
  • dbt Slack
  • Blog
  • GitHub
dbt Logo
  • Docs
  • Reference
  • dbt CLI
  • dbt Cloud
  • FAQs
  • Learn
    • Getting Started Tutorial
    • Online Courses
    • Live Courses
  • Community
    • dbt Slack
    • Blog
    • GitHub
  • Project configs
    • dbt_project.yml
    • analysis-paths
    • asset-paths
    • clean-targets
    • config-version
    • seed-paths
    • dispatch (config)
    • docs-paths
    • log-path
    • macro-paths
    • packages-install-path
    • name
    • on-run-start & on-run-end
    • profile
    • query-comment
    • quoting
    • require-dbt-version
    • snapshot-paths
    • model-paths
    • target-path
    • test-paths
    • version
  • Adapter-specific configs
    • Postgres configurations
    • BigQuery configurations
    • Redshift configurations
    • Snowflake configurations
    • Apache Spark configurations
  • Resource configs and properties
    • Configs, properties, what are they?
    • General properties
      • columns
      • config
      • description
      • docs
      • quote
      • tests
    • General configs
      • alias
      • database
      • enabled
      • full_refresh
      • persist_docs
      • pre-hook & post-hook
      • schema
      • tags
      • meta
      • Advanced usage
      • Using the + prefix
    • For models
      • Model properties
      • Model configurations
      • materialized
      • sql_header
    • For seeds
      • Seed properties
      • Seed configurations
      • column_types
      • quote_columns
    • For snapshots
      • Snapshot properties
      • Snapshot configurations
      • check_cols
      • strategy
      • target_database
      • target_schema
      • unique_key
      • updated_at
      • invalidate_hard_deletes
    • For tests
      • Test configurations
      • fail_calc
      • limit
      • severity
      • store_failures
      • where
    • For sources
      • Source properties
      • Source configurations
      • database
      • external
      • freshness
      • identifier
      • loader
      • quoting
      • schema
      • overrides
    • For analyses
      • Analysis properties
    • For exposures
      • Exposure properties
    • For macros
      • Macro properties
      • type
  • Commands
    • dbt Command reference
    • Node selection
      • Syntax overview
      • Graph operators
      • Set operators
      • Exclude
      • Methods
      • Putting it together
      • YAML Selectors
      • Test selection examples
      • Defer
      • Caveats to state comparison
    • List of commands
      • build
      • clean
      • docs
      • compile
      • debug
      • deps
      • init
      • ls (list)
      • parse
      • rpc
      • run
      • run-operation
      • seed
      • snapshot
      • source
      • test
    • Global CLI flags
    • Global Configs
    • Exit codes
    • Project Parsing
  • Jinja Reference
    • dbt Jinja Functions
    • List of dbt Jinja functions
      • adapter
      • as_bool
      • as_native
      • as_number
      • as_text
      • builtins
      • config
      • dbt_version
      • debug
      • dispatch
      • doc
      • env_var
      • exceptions
      • execute
      • flags
      • fromjson
      • fromyaml
      • graph
      • invocation_id
      • log
      • model
      • modules
      • project_name
      • ref
      • return
      • run_query
      • run_started_at
      • schema
      • source
      • statement blocks
      • target
      • this
      • tojson
      • toyaml
      • var
      • profiles.yml Context
      • dbt_project.yml Context
      • on-run-end Context
    • dbt Classes
  • Profiles (CLI only)
    • profiles.yml
    • BigQuery Profile
    • Postgres Profile
    • Redshift Profile
    • Snowflake Profile
    • Microsoft SQL Server Profile
    • Presto Profile
    • Trino Profile
    • Apache Spark Profile
    • Exasol Profile
    • Oracle Profile
    • Microsoft Azure Synapse DW Profile
    • Dremio Profile
    • ClickHouse Profile
    • Materialize Profile
  • dbt Artifacts
    • Overview
    • Manifest
    • Run Results
    • Catalog
    • Sources
    • Other Artifacts

dbt Jinja Functions

In addition to the standard Jinja library (docs), we've added additional functions and variables to the Jinja context that are useful when working with a dbt project:

  • adapter
  • as_bool
  • as_native
  • as_number
  • as_text
  • builtins
  • config
  • dbt_version
  • dbt-project-yml-context
  • debug-method
  • doc
  • env_var
  • exceptions
  • execute
  • flags
  • fromjson
  • fromyaml
  • graph
  • invocation_id
  • log
  • modules
  • on-run-end-context
  • profiles-yml-context
  • project_name
  • ref
  • return
  • run_query
  • run_started_at
  • schema
  • schemas
  • source
  • statement-blocks
  • target
  • this
  • tojson
  • toyaml
  • var
Edit this page
Previous
« Project Parsing
Next
adapter »
Copyright © 2021 dbt Labs, Inc. All Rights Reserved.