sempy_labs.mirrored_database package
Module contents
- sempy_labs.mirrored_database.create_mirrored_database(name: str, description: str | None = None, workspace: str | UUID | None = None)
Creates a Fabric mirrored database.
This is a wrapper function for the following API: Items - Create Mirrored Database.
Service Principal Authentication is supported (see here for examples).
- Parameters:
name (str) – Name of the mirrored database.
description (str, default=None) – A description of the mirrored database.
workspace (str | uuid.UUID, default=None) – 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.
- sempy_labs.mirrored_database.delete_mirrored_database(mirrored_database: str, workspace: str | UUID | None = None)
Deletes a mirrored database.
This is a wrapper function for the following API: Items - Delete Mirrored Database.
Service Principal Authentication is supported (see here for examples).
- sempy_labs.mirrored_database.get_mirrored_database_definition(mirrored_database: str | UUID, workspace: str | UUID | None = None, decode: bool = True) dict
Obtains the mirrored database definition.
This is a wrapper function for the following API: Items - Get Mirrored Database Definition.
Service Principal Authentication is supported (see here for examples).
- Parameters:
mirrored_database (str | uuid.UUID) – The name or ID of the mirrored database.
workspace (str | uuid.UUID, default=None) – The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.
decode (bool, default=True) – If True, decodes the mirrored database definition file into .json format. If False, obtains the mirrored database definition file in base64 format.
- Returns:
The mirrored database definition.
- Return type:
- sempy_labs.mirrored_database.get_mirroring_status(mirrored_database: str | UUID, workspace: str | UUID | None = None) str
Get the status of the mirrored database.
This is a wrapper function for the following API: Mirroring - Get Mirroring Status.
Service Principal Authentication is supported (see here for examples).
- Parameters:
- Returns:
The status of a mirrored database.
- Return type:
- sempy_labs.mirrored_database.get_tables_mirroring_status(mirrored_database: str | UUID, workspace: str | UUID | None = None) DataFrame
Gets the mirroring status of the tables.
This is a wrapper function for the following API: Mirroring - Get Tables Mirroring Status.
Service Principal Authentication is supported (see here for examples).
- Parameters:
- Returns:
A pandas dataframe showing the mirroring status of the tables.
- Return type:
- sempy_labs.mirrored_database.list_mirrored_databases(workspace: str | UUID | None = None) DataFrame
Shows the mirrored databases within a workspace.
This is a wrapper function for the following API: Items - List Mirrored Databases.
Service Principal Authentication is supported (see here for examples).
- Parameters:
workspace (str | uuid.UUID, default=None) – 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.
- Returns:
A pandas dataframe showing the mirrored databases within a workspace.
- Return type:
- sempy_labs.mirrored_database.start_mirroring(mirrored_database: str | UUID, workspace: str | UUID | None = None)
Starts the mirroring for a database.
This is a wrapper function for the following API: Mirroring - Start Mirroring.
Service Principal Authentication is supported (see here for examples).
- Parameters:
- sempy_labs.mirrored_database.stop_mirroring(mirrored_database: str | UUID, workspace: str | UUID | None = None)
Stops the mirroring for a database.
This is a wrapper function for the following API: Mirroring - Stop Mirroring.
Service Principal Authentication is supported (see here for examples).
- Parameters:
- sempy_labs.mirrored_database.update_mirrored_database_definition(mirrored_database: str | UUID, mirrored_database_content: dict, workspace: str | UUID | None = None)
Updates an existing notebook with a new definition.
Service Principal Authentication is supported (see here for examples).
- Parameters:
mirrored_database (str | uuid.UUID) – The name or ID of the mirrored database to be updated.
mirrored_database_content (dict) – The mirrored database definition (not in Base64 format).
workspace (str | uuid.UUID, default=None) – The name or ID of the workspace. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.