Preview the fully scoped name of the model

I use generate_schema_name and generate_database_name pretty much every time I work with dbt and need to tweak it. What is the best way to check fully-scoped name of the model without actually running it? I don’t want to run it as, if there are mistakes, it just produces tables/views in the wrong place.

You can run dbt compile. This while generate the excutable sql code in your target folder without executing it.

The SQL yes but what about the full name of the model that includes project and dataset?

It will only say “Compiled node <name_of_model>”

but I would like “project-123.dataset-1.<name_of_model>”

If you dbt compile and then look at the manifest.json, it will have the information about dbt’s naming of the model.

Note: @Mike Stanley originally posted this reply in Slack. It might not have transferred perfectly.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.