using config.get within model SQL file

I’m trying to use the config.get within a model file:

{{ config(tags=[“some category”],asofdate=“AS_OF_DATE_DAILYLOAD”) }}

{%- set as_of_dates_table=dbt.config.get(‘asofdate’,‘some default’-%}
—Fails with ref error

However, this works fine as a string
{%- set as_of_dates_table=‘AS_OF_DATE_DAILYLOAD’-%}

@rpitts
To access config fields u have to use config.get method but in the above example u have used dbt.config.get

Weirdly I did try that:

{%- set as_of_dates_table=dbt.config.get(‘asofdate’,‘AS_OF_DATE_DAILYLOAD’)-%}

Received this error instead:
The name argument to ref() must be a string, got <class ‘dbt.clients.jinja.create_undefined..Undefined’>

Any solution here in fixing this problem?

plz remove dbt.
and use
{%- set as_of_dates_table=config.get(‘asofdate’,‘AS_OF_DATE_DAILYLOAD’)-%}