Search code examples
dbt

dbt docs generate failing on circleci


I see this error:

dbt docs generate --profiles-dir ***** --project-dir *****
Running with dbt=0.20.2
[WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 4 unused configuration paths:
- models.data_vault.raw_vault.link
- models.data_vault.raw_vault.sat
- models.data_vault.raw_vault.t_link
- models.data_vault.business_vault

Found 30 models, 7 tests, 0 snapshots, 0 analyses, 461 macros, 0 operations, 0 seed files, 28 sources, 0 exposures

ERROR: Database Error
  timeout expired
  
make: *** [Makefile:36: docs-circle] Error 1

What is the database error? Why is it timing out? Why is a database needed here for dbt docs generate?


Solution

  • What is the database error? 
    

    It is a timeout error

    Why is it timing out? 
    

    No way we can know that without knowing details about your db or configurations and network.

    Why is a database needed here for dbt docs generate?
    

    The dbt docs generate command will go and run a bunch of SQL against your database to get metadata about your sources. For example, if your target/profile is Redshift, it'll go query rowcount, table size, sort keys, dist style, stats, etc. from the system tables.