snowflake.core.catalog_integration.CatalogIntegrationCollectionΒΆ

class snowflake.core.catalog_integration.CatalogIntegrationCollection(root: Root)ΒΆ

Bases: CatalogIntegrationCollectionBase

Represents the collection operations on the Snowflake Catalog Integration resource.

With this collection, you can create, iterate through, and fetch catalog integrations that you have access to in the current context.

Examples

Creating a catalog integration instance by glue:

>>> root.catalog_integrations.create(
...     CatalogIntegration(
...         name="my_catalog_integration",
...         catalog=Glue(
...             catalog_namespace="abcd-ns",
...             glue_aws_role_arn="arn:aws:iam::123456789012:role/sqsAccess",
...             glue_catalog_id="1234567",
...         ),
...         table_format="ICEBERG",
...         enabled=True,
...     )
... )
Copy

Creating a catalog integration instance by object store:

>>> root.catalog_integrations.create(
...     CatalogIntegration(
...         name="my_catalog_integration",
...         catalog=ObjectStore(),
...         table_format="ICEBERG",
...         enabled=True,
...     )
... )
Copy

Creating a catalog integration instance by polaris:

>>> root.catalog_integrations.create(
...     CatalogIntegration(
...         name="my_catalog_integration",
...         catalog=Polaris(
...             catalog_namespace="abcd-ns",
...             rest_config=RestConfig(
...                 catalog_uri="https://my_account.snowflakecomputing.com/polaris/api/catalog",
...                 warehouse_name="my_warehouse",
...             ),
...             rest_authenticator=OAuth(
...                 type="OAUTH",
...                 oauth_client_id="my_oauth_client_id",
...                 oauth_client_secret="my_oauth_client_secret",
...                 oauth_allowed_scopes=["PRINCIPAL_ROLE:ALL"],
...             ),
...         ),
...         table_format="ICEBERG",
...         enabled=True,
...     )
... )
Copy

Attributes

rootΒΆ

The Root object this collection belongs to.

Methods

create(catalog_integration: CatalogIntegration, mode: CreateMode | str | None = None) β†’ CatalogIntegrationResourceΒΆ

Create a catalog integration.

Parameters:
  • catalog_integration (CatalogIntegration) – (required)

  • mode (Union[CreateMode, str]) – Parameter allowing support for different modes of resource creation. Possible values include: - errorIfExists: Throws an error if you try to create a resource that already exists. - orReplace: Automatically replaces the existing resource with the current one. - ifNotExists: Creates a new resource when an alter is requested for a non-existent resource.

create_async(catalog_integration: CatalogIntegration, mode: CreateMode | str | None = None) β†’ PollingOperation[CatalogIntegrationResource]ΒΆ

An asynchronous version of create().

Refer to PollingOperation for more information on asynchronous execution and the return type.

items() β†’ ItemsView[str, T]ΒΆ
iter(like: str | None = None) β†’ Iterator[CatalogIntegration]ΒΆ

Iterate through CatalogIntegration objects from Snowflake.

Parameters:

like (str, optional) – A case-insensitive string functioning as a filter, with support for SQL wildcard characters (% and _).

iter_async(like: str | None = None) β†’ PollingOperation[Iterator[CatalogIntegration]]ΒΆ

An asynchronous version of iter().

Refer to PollingOperation for more information on asynchronous execution and the return type.

keys() β†’ KeysView[str]ΒΆ
update_reference(old_name: str, new_name: str, resource: T) β†’ NoneΒΆ

Update the collection with a new item.

values() β†’ ValuesView[T]ΒΆ