DBT doesn't throw an error when running dbt docs generate but the catalog.json is missing

Viewed 929

I'm new to dbt, I am successfully able to create my models and schemas and macros, but when I do dbt docs generate I get manifest.json, but not catalog.json and so dbt docs serve is failing. It throws the below error.

enter image description here

I checked through my logs I don't find an error, I ran the generated sql from logs in snowflake and it works as well.

Below is what I get when I run dbt docs generate

(ENV) C:\Users\grands1\Desktop\Projects\Project_name> dbt docs generate
18:45:10  Running with dbt=1.0.4
18:45:10  Found 9 models, 4 tests, 0 snapshots, 0 analyses, 180 macros, 0 operations, 0 seed files, 0 sources, 0 exposures, 0 metrics
18:45:10
18:45:15  Concurrency: 1 threads (target='dev')
18:45:15
18:45:16  Done.
18:45:16  Building catalog
(ENV) C:\Users\grands1\Desktop\Projects\Project_name> 

Is there a way to understand where this issue is coming from? Is it possible to better debug dbt docs generate command?

Thank you, Sai.

2 Answers

Looks like generate is terminating before it writes your catalog file. The last line of your terminal output should be Catalog written to /my/project/dir/target/catalog.json, which isn't in your output.

You can run dbt --debug docs generate to get a more verbose output, which might show you what went wrong. You may also want to try dbt debug to ensure your project and profiles are configured properly. You will need access to write the catalog file to the target directory in your environment

Wondering if you made any progress here, but I had the same error. Based on your log it seems to be running on windows, so take a look at the event viewer, as dbt isn't logging the error it means the issue is happening beyond dbt scope of view (one must agree they could have better error handling though..) my event viewer showed:

Faulting application name: python.exe, version: 3.9.12150.1013, time stamp: 0x623bb3b2
Faulting module name: arrow.dll, version: 0.0.0.0, time stamp: 0x627169b9
Exception code: 0xc0000005
Fault offset: 0x000000000003a4d1
Faulting process id: 0x73a0
Faulting application start time: 0x01d88f51af526cac
Faulting application path: C:\opt\Python39\python.exe
Faulting module path: C:\opt\Python39\lib\site-packages\pyarrow\arrow.dll
Report Id: b6d04979-1315-48d1-a414-9e766bac372e
Faulting package full name: 
Faulting package-relative application ID: 

Which means the issue in my env was the pyarrow package. this package isn't referenced or used by neither dbt-core or dbt-snowflake (which is the one I'm using), so I assume this must be a segfault or package conflict that's causing the python.exe process to die abnormally.

Solution for me: created a new, clean venv

cd c:\path\to\venvs
"python -m venv dbt " .\dbt\Scripts\activate

"pip install" the necessary DBT packages only and retry.

Related