[Feature] postgres__get_columns_in_relation should support materialized views #124
Open
3 tasks done
Labels
enhancement
New feature or request
Is this your first time submitting a feature request?
Describe the feature
The macro
postgres__get_columns_in_relation
(link) only looks at theinformation_schema.columns
to get the column names for the particular relation. This doesn't work for materialized views becauseinformation_schema.columns
doesn't include information about materialized views. I think that adaptor macro could be enhanced to account for this and potentially look atpg_attribute
(docs) instead. Based on this Stack Overflow it looks like its possible. I'm happy to research some more if that's helpful.Describe alternatives you've considered
I considered reporting this as a bug but I think its more of a feature request. I imagine the information schema choice was intentional and maybe there is something I'm not considering about
pg_attribute
that you all have already considered that makes it unfeasible. In that case I'd propose documenting this nuance for postgres.Who will this benefit?
Anyone using the
dbt_utils.star
macro with postgres (like I was)Are you interested in contributing this feature?
I'm happy to contribute if this request is accepted
Anything else?
No response
The text was updated successfully, but these errors were encountered: