Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt docs generate: Expected only one database in get_catalog #58

Open
stevenbeeckman opened this issue Mar 13, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@stevenbeeckman
Copy link

Describe the bug

I was trying to generate docs for my projects (to check out dbt's data lineage feature) but it gave the below error.

I'm not sure if I should register information_schema as another source in my source.yml file (so I could use {{ source() }})?

$ dbt docs generate
Running with dbt=0.19.0
Found 8 models, 2 tests, 0 snapshots, 0 analyses, 140 macros, 0 operations, 0 seed files, 2 sources, 0 exposures

21:41:44 | Concurrency: 4 threads (target='tst')
21:41:44 |
21:41:45 | Done.
21:41:45 | Building catalog
Encountered an error:
Compilation Error
  Expected only one database in get_catalog, found [<InformationSchema INFORMATION_SCHEMA>, <InformationSchema villo.INFORMATION_SCHEMA>]

Steps To Reproduce

In as much detail as possible, please provide steps to reproduce the issue. Sample data that triggers the issue, example model code, etc is all very helpful here.

I have a file called source.yml in my models folder so I can refer to some tables using the {{ source() }} feature.

These are the first 8 lines of source.yml:

version: 2

sources:
  - name: villo
    description: The database containing all the measurements.
    database: villo

    tables:

This is my profiles.yml:

sm_villo:
  target: tst
  outputs:
    tst:
      type: mysql
      server: localhost
      user: ************
      password: ***************
      schema: villo
      threads: 4

I ran dbt docs generate.

Expected behavior

HTML documentation is generated.

Screenshots and log output

The output of dbt --version:

installed version: 0.19.0
   latest version: 0.19.0

Up to date!

Plugins:
  - postgres: 0.19.0
  - bigquery: 0.19.0
  - mysql: 0.19.0
  - snowflake: 0.19.0
  - mysql5: 0.19.0
  - redshift: 0.19.0

The operating system you're using:

Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-62-generic x86_64)

The output of python --version:

Python 3.8.5

Additional context

@stevenbeeckman stevenbeeckman added the bug Something isn't working label Mar 13, 2021
@stevenbeeckman
Copy link
Author

For the record: dbt docs serve does work flawlessly!

@Abuton
Copy link

Abuton commented Sep 24, 2021

removing the database bit in your source.yml should fix the error @stevenbeeckman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants