-
Notifications
You must be signed in to change notification settings - Fork 177
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
Fix #1102: Use show ... starts with
instead of show ... like
in _show_object_metadata
#1107
Conversation
…_object_metadata
show ... starts with
instead of show ... like
in _show_object_metadata
show ... starts with
instead of show ... like
in _show_object_metadata
show ... starts with
instead of show ... like
in _show_object_metadata
show ... starts with
instead of show ... like
in _show_object_metadata
show ... starts with
instead of show ... like
in _show_object_metadata
To be extra clear, this was Snowflake's response because |
I'm not sure, and I'm not sure if it matters since the objects are always returned in alphabetical order. show objects in ANALYTICS_DEV.DBT_KARANKE starts with 'STG_HUBSPOT__CONTACT';
show objects in ANALYTICS_DEV.DBT_KARANKE starts with 'STG_HUBSPOT__CONTACT' LIMIT 1;
|
Agreed, and this is the confirmation I was looking for. |
Resolves #1102
Problem
We want to use
show...starts with
instead ofshow...like
in_show_object_metadata
for faster query times, as per Snowflake guidance.Solution
snowflake__show_object_metadata
macrostarts with
is case-sensitive, convert cases within the relation before sending off to macro; this is done via the newas_case_sensitive
method.as_case_sensitive
to ensure expected behavior.Closed Questions
Let’s say I have 3 tables:
❓ Am I guaranteed that
show objects in schema my_schema starts with 'my_table' limit 1
will always return metadata formy_table
and never for the other two?Since technically all three satisfy the
starts_with 'my_table'
condition.Answer from Snowflake: Yes, in this case, as you have specified limit 1, the output will be
my_table
.Checklist