Can't generate dbt docs
See original GitHub issueDescribe the bug
We use the dbt-databricks adapter and can successfully read our models from dbt and also write them. However, when we call dbt docs generate
we get the following error: Expected only one database in get_catalog, found.
To be on the safe side, I took another look at the source.yml
. Unfortunately, only the schema is set there and I don’t know why dbt docs generate shouldn’t work.
Steps To Reproduce
Try to generate the dbt docs for a databricks destination / source
Expected behavior
Docs should be generated
Screenshots and log output
System information
The output of dbt --version
:
╰─$ dbt --version
installed version: 1.0.1
latest version: 1.0.1
Up to date!
Plugins:
- databricks: 1.0.0
- spark: 1.0.0
The operating system you’re using:
The output of python --version
:
╰─$ python --version
Python 3.8.12
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
docs - dbt Developer Hub
dbt docs has two supported subcommands: generate and serve. ... The command is responsible for generating your project's documentation ...
Read more >DBT view docs button didn't show up after successfully run ...
Try deleting your target/ folder and re-running dbt docs generate . If that doesn't work, you can reach out to the support team...
Read more >Export documentation site as a set of static pages. · Issue #1916
I'd use something like Gatsby to create the static pages. ... dbt Docs was unable to load the mantifest file at path: manifest.json?cb= ......
Read more >View your dbt documentation as a website - YouTube
Another great feature of dbt - Share all aspects of your dbt project by using the built in dbt docs command to serve...
Read more >dbt (Data Build Tool) Integration | Welcome to FlexIt Learning
If using dbt CLI, you can connect to a Docs server or manually upload ... for your dbt config, then you cannot make...
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
Thanks for this @mcfuhrt! I was able to reproduce the error, using the example you’ve provided.
It looks like this line in your source definition is to blame:
If I switch that to
database: false
, or remove that line entirely,docs generate
works fine.Alternatively, if I add those lines to
dbt_project.yml
so that the project-widequoting
config matches (docs), it also works.There are two ways forward I can see:
SchemaSearchMap
(called by_get_catalog_schemas
), which currently views a quoted"None"
database and an unquotedNone
database as distinct entries in the set of databases. This makes sense in the general case—they have differentquote_policy
—but it doesn’t make sense when the value isNone
.database
to be defined elsewhere indbt-spark
(+dbt-databricks
, at least until https://github.com/dbt-labs/dbt-spark/issues/281), it really feels like our answer here should be to raise an explicit error any time thequoting
config is defined at thedatabase
level. That could look like adding a__post_init__
hook to theSparkQuotePolicy
:This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.