-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[CT-1951] [Feature] get_relations_by_pattern should move from utils to Core #6789
Comments
Thanks for opening this @joellabes ! Big picture
💯 agreed that this would benefit from a reliable cross-database implementation! Connecting the dotsI see this as spiritually related to: And it might resolve many or all of these:
And these contain some of the historical context as it relates to external tables:
Brass tacksWhat's involvedI didn't robustly check all the details, but it looks like removing
These are found in the following files:
This would require double-checking -- maybe that's it, but maybe there would be more. Considering the current implementation of
|
I wouldn't be averse to this supporting regex for example if it could be done in a broadly compatible way. |
This just came up again in dbt-labs/dbt-utils#779 |
This is still outstanding 10 months later. Is it possible we get the original PR i made to resolve this merged @joellabes seeing as there appears to be no traction on a fix in dbt-core. |
Is this your first time submitting a feature request?
Describe the feature
This is prompted by dbt-labs/dbt-utils#753, which aims to add support for Redshift external tables to the above macro.
It is unclear whether/how the other adapters' implementations support external tables, and as I started looking into it I realised that since it was poking around in the information schema directly, it is probably something that would be better suited to a consistent, reliable cross-database implementation. That is to say, it would be better suited to living in the adapters!
Describe alternatives you've considered
YOLO-merging the changes and accepting that Redshift finds external tables where BQ wouldn't (NB: I have no idea whether BQ's version finds external tables, that's the whole problem). I'll be back in this same spot in 6 months when someone opens another utils issue for another adapter, and so on.
Who will this benefit?
Mostly me? Also users of smaller adapters, especially those that don't have an info schema.
I forgot to fully deprecate its older and less flexible
get_relations_by_prefix
sibling macro during the v1 migration. For the avoidance of doubt, you shouldn't migrate that over.Both of these would stick around in dbt utils using the same sort of forwarding setup as
{{ dbt.type_int() }}
and friends had in the 0.9.x vintage.Are you interested in contributing this feature?
If needed, but there's probably others who could do it better!
Anything else?
No response
The text was updated successfully, but these errors were encountered: