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
  • Configurations
    • dbt_project.yml
    • Project configurations
      • analysis-paths
      • asset-paths
      • clean-targets
      • config-version
      • data-paths
      • docs-paths
      • log-path
      • macro-paths
      • modules-path
      • name
      • on-run-start & on-run-end
      • profile
      • query-comment
      • quoting
      • require-dbt-version
      • snapshot-paths
      • source-paths
      • target-path
      • test-paths
      • version
    • Model configurations
    • Seed configurations
    • Source configurations
    • Snapshot configurations
    • Data test configurations
    • List of general configs
      • alias
      • database
      • enabled
      • full_refresh
      • persist_docs
      • pre-hook & post-hook
      • schema
      • tags
    • List of model configs
      • materialized
      • sql_header
    • List of seed configs
      • column_types
      • quote_columns
    • List of snapshot configs
      • check_cols
      • strategy
      • target_database
      • target_schema
      • unique_key
      • updated_at
      • invalidate_hard_deletes
    • BigQuery configurations
    • Redshift configurations
    • Snowflake configurations
    • Apache Spark configurations
    • Advanced usage
    • Using the + prefix
  • Properties (schema.yml files)
    • Declaring resource properties
    • Model properties
    • Source properties
    • Seed properties
    • Snapshot properties
    • Analysis properties
    • Macro properties
    • Exposure properties
    • List of general properties
      • description
      • docs
      • meta
      • quote
      • tags
      • tests
    • List of source properties
      • database
      • freshness
      • identifier
      • loader
      • quoting
      • schema
      • overrides
    • List of 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
      • clean
      • docs
      • compile
      • debug
      • deps
      • init
      • ls (list)
      • rpc
      • run
      • run-operation
      • seed
      • snapshot
      • source
      • test
    • Global CLI flags
    • Exit codes
  • Jinja Reference
    • dbt Jinja Functions
    • List of dbt Jinja functions
      • adapter
      • as_bool
      • as_native
      • as_number
      • as_text
      • builtins
      • config
      • dbt_version
      • debug
      • 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
    • 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
« Exit codes
Next
adapter »
Copyright © 2021 Fishtown Analytics, Inc.