Output custom schema name in model

I am using dbt cloud IDE. Suppose I have a custom schema in a .yaml file like below:

models:
    -name: example_model
     config:
         schema: some_schema_name

How do I output the schema name in example_model.sql model ?

I have tried different things like {{ model.schema }}, {{ target.schema }}, {{ this.schema }}, {{ config.schema }}, but nothing gives me the desired template output which is ‘some_schema_name’ in this case.

u have given schema under config block, can u try this {{ config.get('schema') }}

Hi, this does not work. I think it takes input from user and so it will output None if user does not provide any input.

isn’t present in .yml file?

Yes, the value is already present in .yml file. So user does not need to provide the value as input. But {{ config.get(‘schema’) }} outpus None.