snowflake.core.Root¶
- class snowflake.core.Root(connection: SnowflakeConnection | Session)¶
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:
- 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.
- databases¶
Returns the
DatabaseCollectionthat represents the visible databases.Examples
Getting a specific database resource:
- 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:
- parameters¶
- roles¶
Returns the
RoleCollectionthat represents the visible roles.Examples
Getting a specific role resource:
- session¶
Returns the session that is used to create this
Rootinstance.
- 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: