Skip to content

[POC] Fix documentation generation by internally filling the database configuration field#640

Draft
koletzilla wants to merge 1 commit into
mainfrom
ClickHouse/fix-database-for-document-generation
Draft

[POC] Fix documentation generation by internally filling the database configuration field#640
koletzilla wants to merge 1 commit into
mainfrom
ClickHouse/fix-database-for-document-generation

Conversation

@koletzilla
Copy link
Copy Markdown
Contributor

DO NOT MERGE, IT'S NOT SAFE.

This is just a POC to try to understand how many changes would be required to fix #311

The issue is related to our dbt-clickhouse not filling the database field on purpose. dbt uses database, schema and table to reference resources crates in the database but CH only uses 2, database and table. in dbt world, we are using instead schema and table and leave empty database to avoid errors.

This impacts tools that may want to process this information to build information systems.

In this PR I'm trying to see how we can fill the database configuration in some places so:

  • 🟡 Users will still not configure it on purpose, only schema should be available and used
  • 🟡 Code internally should NOT use the database field, only the schema is the one that needs to be used.
  • ✅ The database (being the same name as the schema) is filled in catalog.json and manifest.json files son the database tab in the docs actually have data.

We need to make sure all these things are safe before moving forward with this PR

@koletzilla
Copy link
Copy Markdown
Contributor Author

Note: as expected with this approach as mentioned here #311 (comment) , now some relations are wrongly named in the docs by including both schema and database parts like default.default.my_first_dbt_model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Database tab is empty in generated docs

1 participant