Skip to content
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

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- `divnull`
- `nullifzero`
- `snowflake_cortex_sentiment`
- Added `Catalog` class to manage snowflake objects. It can be accessed via `Session.catalog`.

### Snowpark pandas API Updates

Expand Down
63 changes: 63 additions & 0 deletions docs/source/snowpark/catalog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
=============
Catalog
=============
Catalog module for Snowpark.

.. currentmodule:: snowflake.snowpark.catalog

.. rubric:: Catalog

.. autosummary::
:toctree: api/

Catalog.databaseExists
Catalog.database_exists
Catalog.dropDatabase
Catalog.dropSchema
Catalog.dropTable
Catalog.dropView
Catalog.drop_database
Catalog.drop_schema
Catalog.drop_table
Catalog.drop_view
Catalog.getCurrentDatabase
Catalog.getCurrentSchema
Catalog.getProcedure
Catalog.getTable
Catalog.getUserDefinedFunction
Catalog.getView
Catalog.get_current_database
Catalog.get_current_schema
Catalog.get_procedure
Catalog.get_table
Catalog.get_user_defined_function
Catalog.get_view
Catalog.listColumns
Catalog.listDatabases
Catalog.listProcedures
Catalog.listSchemas
Catalog.listTables
Catalog.listUserDefinedFunctions
Catalog.listViews
Catalog.list_columns
Catalog.list_databases
Catalog.list_procedures
Catalog.list_schemas
Catalog.list_tables
Catalog.list_user_defined_functions
Catalog.list_views
Catalog.procedureExists
Catalog.procedure_exists
Catalog.schemaExists
Catalog.schema_exists
Catalog.setCurrentDatabase
Catalog.setCurrentSchema
Catalog.set_current_database
Catalog.set_current_schema
Catalog.tableExists
Catalog.table_exists
Catalog.userDefinedFunctionExists
Catalog.user_defined_function_exists
Catalog.viewExists
Catalog.view_exists

7 changes: 4 additions & 3 deletions docs/source/snowpark/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Snowpark APIs
column
types
row
functions
window
grouping
functions
window
grouping
table_function
table
async_job
Expand All @@ -21,6 +21,7 @@ Snowpark APIs
udtf
observability
files
catalog
lineage
context
exceptions
Expand Down
1 change: 1 addition & 0 deletions docs/source/snowpark/session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Snowpark Session
Session.append_query_tag
Session.call
Session.cancel_all
Session.catalog
Session.clear_imports
Session.clear_packages
Session.close
Expand Down
1 change: 1 addition & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ requirements:
- protobuf >=3.20,<6
- python-dateutil
- tzlocal
- snowflake.core >=1.0.0,<2

test:
imports:
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"protobuf>=3.20, <6", # Snowpark IR
"python-dateutil", # Snowpark IR
"tzlocal", # Snowpark IR
"snowflake.core>=1.0.0, <2", # Catalog
]
REQUIRED_PYTHON_VERSION = ">=3.8, <3.12"

Expand Down
Loading
Loading