snowflake.core.catalog_integration.CatalogIntegrationCollectionΒΆ
- class snowflake.core.catalog_integration.CatalogIntegrationCollection(root: Root)ΒΆ
Bases:
CatalogIntegrationCollectionBaseRepresents 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, ... ) ... )
Creating a catalog integration instance by object store:
>>> root.catalog_integrations.create( ... CatalogIntegration( ... name="my_catalog_integration", ... catalog=ObjectStore(), ... table_format="ICEBERG", ... enabled=True, ... ) ... )
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, ... ) ... )
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
PollingOperationfor more information on asynchronous execution and the return type.
- items() ItemsView[str, T]ΒΆ
- iter(like: str | None = None) Iterator[CatalogIntegration]ΒΆ
Iterate through
CatalogIntegrationobjects 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
PollingOperationfor 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]ΒΆ