Dbt: `docs generate` times out and fails

Created on 18 Jun 2020  路  2Comments  路  Source: fishtown-analytics/dbt

Describe the bug

When running docs generate, our project is timing out with the error message:

Encountered an error while generating catalog: Database Error
  000630 (57014): Statement reached its statement or warehouse timeout of 1,200 second(s) and was canceled.

Full log below.

Steps To Reproduce

dbt docs generate --target=$DBT_PROFILE

I should also note that dbt run, dbt compile, and dbt list all run without issue.

Expected behavior

Normally this runs in just a few minutes.

  • If there's a block/lock on the database side (snowflake in this case), I would expect dbt to provide more information on the command that timed out.
  • I imagine some number of issues could be considered 'warnings' and could optionally be logged to the output and raised as errors only if --warnings_as_errors is set.

Screenshots and log output

+ dbt docs generate --target=$DBT_PROFILE
Running with dbt=0.17.0
WARNING: Test 'test.data_platform_core.not_null_dim_opportunity_opportunity_id' (data/transforms/sales/schema.yml) depends on a node named 'dim_opportunity' which was not found
WARNING: Test 'test.data_platform_core.not_null_dim_opportunity_is_closed' (data/transforms/sales/schema.yml) depends on a node named 'dim_opportunity' which was not found
WARNING: Test 'test.data_platform_core.accepted_values_dim_opportunity_opportunity_type__Goal__New__Change_Request' (data/transforms/sales/schema.yml) depends on a node named 'dim_opportunity' which was not found
WARNING: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 2 unused configuration paths:
- models.data_platform_core.persist_docs
- seeds.data_platform_core.list_integers.column_types
Found 48 models, 6 tests, 0 snapshots, 0 analyses, 137 macros, 0 operations, 1 seed file, 48 sources
16:52:19 | Concurrency: 1 threads (target='beta')
16:52:19 | 
16:52:22 | Done.
16:52:22 | Building catalog
Encountered an error while generating catalog: Database Error
  000630 (57014): Statement reached its statement or warehouse timeout of 1,200 second(s) and was canceled.
dbt encountered 1 failure while writing the catalog
17:12:32 | Catalog written to /opt/atlassian/pipelines/agent/build/.dbt/.output/catalog.json

System information

Which database are you using dbt with?

  • [ ] postgres
  • [ ] redshift
  • [ ] bigquery
  • [x] snowflake
  • [ ] other (specify: ____________)

The output of dbt --version:

installed version: 0.17.0
   latest version: 0.17.0
Up to date!
Plugins:
  - snowflake: 0.17.0
  - redshift: 0.17.0
  - postgres: 0.17.0
  - bigquery: 0.17.0

The operating system you're using:

ubuntu

The output of python --version:

3.7

Additional context

I'm not sure what's causing this or how to debug.

bug

Most helpful comment

@jtcohen6 - Bother! Embarrassed to say this, but I apparently didn't preserve my logs. This is running in a CI pipeline and a few commits back I changed the output directory in dbt_project.yml without also updating it in my CI scripts.

I will check there in that folder next time I see this issue and will post back here.

All 2 comments

@aaronsteers Could you look in the logs/ for the exact SQL statement that was hanging in Snowflake? The Building catalog step involves running several metadata queries, I think we'll need to know which one is the culprit.

@jtcohen6 - Bother! Embarrassed to say this, but I apparently didn't preserve my logs. This is running in a CI pipeline and a few commits back I changed the output directory in dbt_project.yml without also updating it in my CI scripts.

I will check there in that folder next time I see this issue and will post back here.

Was this page helpful?
0 / 5 - 0 ratings