I am new to dbt. I want to retrieve dbt project name in dbt model sql file.
Ex:
SELECT '{{<project_name>}}'||'.'||'{{model.path}}' AS UPDATED_BY ;
How can I pass <project_name> here. I dont want to create a variable in dbt_project.yml file to pass project name, instead I want the project name to be coming from dbt system variables.
Thanks in Advance.
Unfortunately, there is no straightforward way to access the root project folder name.
In the dbt_project.yml file, there is a pre-populated
namefield that you can access using"project_name"in any dbt model.