Share via


sql_endpoint Package

Functions

get_sql_endpoint_connection_string

Get the SQL endpoint connection string of the specified warehouse.

Note

This function wraps the Fabric REST API Items - Get Connection String.

get_sql_endpoint_connection_string(warehouse: str | UUID | None = None, warehouse_type: Literal['Lakehouse', 'MirroredDatabase'] | None = None, sql_endpoint_id: str | UUID | None = None, *, workspace: str | UUID | None = None, guest_tenant_id: str | None = None, private_link_type: str | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
warehouse
str or UUID

The name or ID of the warehouse. Mutually exclusive with sql_endpoint_id.

Default value: None
warehouse_type
<xref:Literal>[<xref:”Lakehouse”, "MirroredDatabase"]

The type of the warehouse. Must be provided if warehouse is provided. Mutually exclusive with sql_endpoint_id.

Default value: None
sql_endpoint_id
str or UUID

The SQL endpoint ID. Mutually exclusive with warehouse and warehouse_type.

Default value: None
workspace
str or UUID

The Fabric workspace name or UUID object containing the workspace ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
guest_tenant_id
str

The guest tenant ID to use for cross-tenant access scenarios.

Default value: None
private_link_type
str

The private link type to use for the connection string.

Default value: None
credential
<xref:sempy.fabric.sql_endpoint.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Keyword-Only Parameters

Name Description
workspace
Default value: None
guest_tenant_id
Default value: None
private_link_type
Default value: None
credential
Default value: None

Returns

Type Description
str

The SQL endpoint connection string of the specified warehouse.

get_sql_endpoint_id

Get the SQL endpoint ID of the specified warehouse.

get_sql_endpoint_id(warehouse: str | UUID, warehouse_type: Literal['Lakehouse', 'MirroredDatabase'], *, workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
warehouse
str or UUID

The name or ID of the warehouse. Mutually exclusive with sql_endpoint_id.

Default value: None
warehouse_type
<xref:Literal>[<xref:”Lakehouse”, "MirroredDatabase"]

The type of the warehouse. Must be provided if warehouse is provided. Mutually exclusive with sql_endpoint_id.

Default value: None
workspace
str or UUID

The Fabric workspace name or UUID object containing the workspace ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
credential
<xref:sempy.fabric.sql_endpoint.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Keyword-Only Parameters

Name Description
workspace
Default value: None
credential
Default value: None

Returns

Type Description
str

The SQL endpoint ID of the specified warehouse.

list_sql_endpoints

List all SQL endpoints in the specified workspace.

Note

This function wraps the Fabric REST API Items - List SQL Endpoints.

list_sql_endpoints(workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> pd.DataFrame

Parameters

Name Description
workspace
str or UUID

The Fabric workspace name or UUID object containing the workspace ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
credential
<xref:sempy.fabric.sql_endpoint.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A pandas dataframe showing the list of SQL endpoints in the specified workspace.

refresh_sql_endpoint_metadata

Refresh the metadata of a SQL endpoint.

Note

This is a wrapper function for Items - Refresh Sql Endpoint Metadata.

refresh_sql_endpoint_metadata(warehouse: str | UUID | None = None, warehouse_type: Literal['Lakehouse', 'MirroredDatabase'] | None = None, sql_endpoint_id: str | UUID | None = None, *, workspace: str | UUID | None = None, timeout_unit: Literal['Seconds', 'Minutes', 'Hours', 'Days'] = 'Minutes', timeout_value: int = 15, credential: TokenCredential | None = None) -> pd.DataFrame

Parameters

Name Description
warehouse
str or UUID

The name or ID of the warehouse. Mutually exclusive with sql_endpoint_id.

Default value: None
warehouse_type
<xref:Literal>[<xref:”Lakehouse”, "MirroredDatabase"]

The type of the warehouse. Must be provided if warehouse is provided. Mutually exclusive with sql_endpoint_id.

Default value: None
sql_endpoint_id
str or UUID

The SQL endpoint ID. Mutually exclusive with warehouse and warehouse_type.

Default value: None
workspace
str or UUID

The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
timeout_unit
<xref:Literal>[<xref:”Seconds”, "Minutes", "Hours", "Days"]

The unit of time for the request duration before timing out. Additional duration types may be added over time.

Default value: "Minutes"
timeout_value
int

The number of time units in the request duration.

Default value: 15
credential
<xref:sempy.fabric.sql_endpoint.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Keyword-Only Parameters

Name Description
workspace
Default value: None
timeout_unit
Default value: Minutes
timeout_value
Default value: 15
credential
Default value: None

Returns

Type Description

A pandas dataframe showing the status of the metadata refresh operation.