enable crossdb column metadata with ra3 nodes #738
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #736
Problem
R3-node users cannot fetch column metadata for tables & views outside of the current database.
Solution
Similar to @jiezhen-chen's approach in #428: use
svv_all_columns
instead ofinformation_schema."columns"
.While we're here, I have a hunch that @aiguofer's dbt-labs/dbt-core#2754 and it's usage of
pg_catalog.svv_external_columns
can be dropped. Still to be verified.Questions
svv_all_columns
includes the results ofsvv_external_columns
?svv_all_columns
only be used if the relation-to-be-fetched'sdatabase
does not match the one to which dbt is currently connected? (similar: [CT-1122] [CT-1116] [Bug]adapter.get_relation
for relations in other databases [RA3] #179 (comment))Checklist