snowflake.core.Root¶
- class snowflake.core.Root(connection: SnowflakeConnection | Session, root_config: RootConfiguration | None = None)¶
Bases:
objectThe entry point of the Snowflake Core Python APIs that manage the Snowflake objects.
- Parameters:
connection (Union[SnowflakeConnection, Session]) – A
SnowflakeConnectionor SnowparkSessioninstance.
Examples
Creating a
Rootinstance:Using the
Rootinstance to access resource management APIs:Attributes
- accounts¶
Returns the
AccountCollectionthat represents the visible accounts.Examples
Getting a specific account resource:
- api_integrations¶
Returns the
ApiIntegrationCollectionthat represents the visible API integrations.Examples
Getting a specific API integration resource:
- catalog_integrations¶
Returns the
CatalogIntegrationCollectionthat represents the visible catalog integrations.Examples
Getting a specific catalog integration resource:
- compute_pools¶
Returns the
ComputePoolCollectionthat represents the visible compute pools.Examples
Getting a specific compute pool resource:
- connection¶
Return the connection in use.
This is the connection used to create this
Rootinstance, or the Snowpark session’s connection if this root is created from a session.
- cortex_agent_service¶
Returns the CortexAgentService that represents the cortex lite Agent service.
Examples
To get the cortex lite Agent service resource, you can do the following:
- cortex_chat_service¶
Returns the CortexChatService that represents the cortex chat service.
Examples
To get the cortex chat service resource, you can do the following:
- cortex_embed_service¶
Returns the CortexEmbedService that represents the cortex embed service.
Examples
To get the cortex embed service resource, you can do the following:
- cortex_inference_service¶
Returns the
CortexInferenceServicethat represents the cortex inference service.Examples
Getting the cortex inference service resource:
- databases¶
Returns the
DatabaseCollectionthat represents the visible databases.Examples
Getting a specific database resource:
- external_session_id¶
- external_volumes¶
Returns the
ExternalVolumeCollectionthat represents the visible external volumes.Examples
Getting a specific external volume resource:
- grants¶
Returns the visible Grants in Snowflake.
Examples
Using the
Grantsobject to grant a privilege to a role:
- managed_accounts¶
Returns the
ManagedAccountCollectionthat represents the visible accounts.Examples
Getting a specific managed account resource:
- network_policies¶
Returns the
NetworkPolicyCollectionthat represents the visible network policies.Examples
Getting a specific network policy resource:
- notification_integrations¶
Returns the
NotificationIntegrationCollectionthat represents the visible notification integrations.Examples
Listing all available Notification Integrations:
- roles¶
Returns the
RoleCollectionthat represents the visible roles.Examples
Getting a specific role resource:
- root_config¶
Return the root configuration object.
- session¶
Returns the session that is used to create this
Rootinstance.
- token_type¶
- users¶
Returns the
UserCollectionthat represents the visible users.Examples
Getting a specific user resource:
- warehouses¶
Returns the
WarehouseCollectionthat represents the visible warehouses.Examples
Getting a specific warehouse resource:
Methods
- parameters(refresh: bool = False) SnowApiParameters¶