-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Enable cataloging unlogged postgres tables #3961
Comments
@ollivierj Good call! It sounds like the fix here is really quite minor, by changing the linked line to: and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables It doesn't look like we have any integration tests for the
Would you be interested in contributing that fix? :) |
@jtcohen6 Hi Jeremy, |
Sounds good! If someone else wishes to contribute the fix for this sooner, I'd welcome a PR for it. |
Describe the bug
We use postgres 12.4.1 as a datawarehouse. During the ingestion processing, we use unlogged tables to speed up writing data into tables. Those tables are in a schema dedicated for storing raw data. We then transform this raw data using dbt.
We use the command below to generate the dbt documentation :
When looking at the dbt documentation, none of the unlogged tables have their columns information filled up.
We checked the dbt code source and found that dbt does ignore unlogged and temporary tables when getting columns information :
https://github.com/dbt-labs/dbt/blob/749f87397ec1e0a270b2e09bd8dbeb71862fdb81/plugins/postgres/dbt/include/postgres/macros/catalog.sql#L39
Steps To Reproduce
Create a postgres unlogged table, initialize a dbt project then run :
Expected behavior
In the dbt documentation, i can see postgres unlogged table columns information
Screenshots and log output
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
The output of
python --version
:Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: