-
Notifications
You must be signed in to change notification settings - Fork 3k
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(ingest/snowflake): handle dots in snowflake table names #12105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Minor comment on where to place the _split_qualified_name
function
def _split_qualified_name(qualified_name: str) -> List[str]: | ||
""" | ||
Split a qualified name into its constituent parts. | ||
|
||
>>> _split_qualified_name("db.my_schema.my_table") | ||
['db', 'my_schema', 'my_table'] | ||
>>> _split_qualified_name('"db"."my_schema"."my_table"') | ||
['db', 'my_schema', 'my_table'] | ||
>>> _split_qualified_name('TEST_DB.TEST_SCHEMA."TABLE.WITH.DOTS"') | ||
['TEST_DB', 'TEST_SCHEMA', 'TABLE.WITH.DOTS'] | ||
>>> _split_qualified_name('TEST_DB."SCHEMA.WITH.DOTS".MY_TABLE') | ||
['TEST_DB', 'SCHEMA.WITH.DOTS', 'MY_TABLE'] | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function seems quite generic and not specific to Snowflake. Could it be moved to a some shared utils file?
Also, consider turning the docstring into a proper unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of doctest
, the docstring is a unit test :)
if we find another system that formats table names the same way, we can move this util into a shared utils location
Checklist