-
Notifications
You must be signed in to change notification settings - Fork 116
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
SNOW-1794369 Catalog API #2655
base: main
Are you sure you want to change the base?
SNOW-1794369 Catalog API #2655
Conversation
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
1 similar comment
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
src/snowflake/snowpark/catalog.py
Outdated
from snowflake.snowpark.types import DataType | ||
|
||
|
||
class Column(NamedTuple): |
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.
snowflake.core
also has Column class. Should we reuse that one?
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.
let me check, maybe I can use that for my implementation.
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.
thanks. updated the PR
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
setup.py
Outdated
@@ -29,6 +29,7 @@ | |||
# `protoc` < 3.20 is not able to generate protobuf code compatible with protobuf >= 3.20. | |||
"protobuf>=3.20, <6", # Snowpark IR | |||
"tzlocal", # Snowpark IR | |||
"snowflake>=1.0.0, <2", # Catalog |
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.
use snowflake.core
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
db_name = self._parse_database(database) | ||
iter = self._root.databases[db_name].schemas.iter() | ||
if pattern: | ||
iter = filter(lambda x: re.match(pattern, x.name), iter) | ||
return list(iter) |
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.
DatabaseModel and SchemaModel don't have from_json methods so we cannot use udf filter for them.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1794369
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
This PR adds the catalog API.