Skip to content

Commit

Permalink
SNOW-1794369 Catalog API (#2655)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-aalam authored Dec 20, 2024
1 parent be0ae7b commit 4ae4c4d
Show file tree
Hide file tree
Showing 10 changed files with 1,318 additions and 3 deletions.
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`.

#### Improvements

Expand Down
67 changes: 67 additions & 0 deletions docs/source/snowpark/catalog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
=============
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.getDatabase
Catalog.getProcedure
Catalog.getSchema
Catalog.getTable
Catalog.getUserDefinedFunction
Catalog.getView
Catalog.get_current_database
Catalog.get_current_schema
Catalog.get_database
Catalog.get_procedure
Catalog.get_schema
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

0 comments on commit 4ae4c4d

Please sign in to comment.