How to get the current schema

Hi,
anyone can help on this? in the dbt_project.yml, i set different model folder to be created in different schema. now want to get current schema during the model create, how would i do that? tried {{target.schema}}, but it doesn;t work. my dbt_project.yml is seting as below, for the model/snapshot folder, i put target_schema and schema to be “semantic_snapshot”. but when use {{target.schema}}, it always return other schema? i am expect to see semantic_snapshot.
also, what would be the difference between +target_schema and +schema?
image
Thanks so much for the help.
ALEX

Hi xzheng,

Just a guess… but I suspect that as it’s a configuration you may need to use {{ config.get(‘target_schema’) }}

From the docs… I’m guessing that +schema is ignored/ not available for snapshots, and that the difference is that snapshots are setup to allow you to put them in a different database & schema from the rest of the dbt project.