Issue when parsing dbt models
See original GitHub issueHey folks!
I’ve just run ‘dbt2looker’ in my local dbt repo folder, and I receive the following error:
❯ dbt2looker
12:11:54 ERROR Cannot parse model with id: "model.smallpdf.brz_exchange_rates" - is the model file empty?
Failed
The model file itself (pictured below) is not empty, therefore I am not sure what the issue with parsing this model dbt2looker appears to have. It is not materialised as a table or view, it is utilised by dbt as ephemeral - is that of importance when parsing files in the project? I’ve also tried running dbt2looker on a limited subset of dbt models via a tag, the same error appears. Any help is greatly appreciated!
Other details:
- on dbt version
dbt 1.0.0
- using dbt-redshift adapter
dbt-redshift@1.0.0
- let me know if anything else is of importance!
Issue Analytics
- State:
- Created a year ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Project Parsing | dbt Developer Hub
Parsing projects can be slow, especially as projects get bigger—hundreds of models, thousands of files—which is frustrating in development.
Read more >[CT-337] [Bug] dbt fails with the only error message being ...
After having seen some messages in the debug log about partial parsing, we did a dbt clean which then showed us an error...
Read more >In dbt, when I add a well formatted .yml file to my project, I stop ...
Sequence of the issue: I created .sql files in my models folder and subfolders, compiled them, ran dbt, and they showed up in...
Read more >Orchestrate dbt with Airflow | Astronomer Documentation
Organizations can use Airflow to orchestrate and execute dbt models as DAGs. ... However, running dbt at the project-level has several issues:.
Read more >A rant against dbt ref - Max Halford
Rant aside, the real problem with the ref function is that you can still write your queries without it. The issue is that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So yesterday I was modding the code and was able to get past the
- is the model file empty?
error.Since the parser uses the manifest.json file, a node has its materialization in the config object:
If the
DbtNode
changes to:then the
parse_models()
method could be modified to:which should ensure the list of models only contains
DbtModel
instances. This might be overkill as a solution and maybe even not the intended effect but it solve those issues for me. Also make sure todbt build
any models that are resulting in that error before you rundbt docs generate
.@lewisosborne I was running into the same issue, I bypassed it by deleting that ephemeral tag at the top and then re-running
dbt docs generate
and then the subsequentdbt2looker
command. That gets me passed the initial error highlighted here.I am running into a different error afterwards where I am seeing
not supported for conversion from redshift to looker
for all of my data types but maybe we can tackle that one separately.Let me know if my initial suggestion gets you past the issue with the ephemeral model.