How to give empty string as accepted_values in DBT


Jinja filter : as_text

If we are giving ‘ ‘ [ two single quotes ] , this will consider as Python keyword “None” and not as empty string. The as_text Jinja filter will convert output produced by the Jinja compiler back to text. It can be applied to yaml rendering situations when values must be supplied as strings rather than the datatype they appear to be.


  - name: freshers_table
      - name: freshers_blog
          - accepted_values:
              values: ['posted', 'draft', "{{ '' | as_text }}"]

NOTE : Native rendering is disabled by default in dbt version 0.17. The as_text filter therefore has no functional impact. This is not required in the later versions of dbt.

Author: user

Leave a Reply