sempy_labs.mirrored_azure_databricks_catalog package

Module contents

sempy_labs.mirrored_azure_databricks_catalog.discover_catalogs(databricks_workspace_connection_id: UUID, workspace: str | UUID | None = None, max_results: int | None = None) DataFrame

Returns a list of catalogs from Unity Catalog.

This is a wrapper function for the following API: Databricks Metadata Discovery - Discover Catalogs.

Parameters:
  • databricks_workspace_connection_id (uuid.UUID) – The ID of the Databricks workspace connection.

  • workspace (str | uuid.UUID, default=None) – The 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.

  • max_results (int, default=None) – The maximum number of results to return. If not specified, all results are returned.

Returns:

A pandas dataframe showing a list of catalogs from Unity Catalog.

Return type:

pandas.DataFrame

sempy_labs.mirrored_azure_databricks_catalog.discover_schemas(catalog: str, databricks_workspace_connection_id: UUID, workspace: str | UUID | None = None, max_results: int | None = None) DataFrame

Returns a list of schemas in the given catalog from Unity Catalog.

This is a wrapper function for the following API: Databricks Metadata Discovery - Discover Schemas.

Parameters:
  • catalog (str) – The name of the catalog.

  • databricks_workspace_connection_id (uuid.UUID) – The ID of the Databricks workspace connection.

  • workspace (str | uuid.UUID, default=None) – The 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.

  • max_results (int, default=None) – The maximum number of results to return. If not specified, all results are returned.

Returns:

A pandas dataframe showing a list of schemas in the given catalog from Unity Catalog.

Return type:

pandas.DataFrame

sempy_labs.mirrored_azure_databricks_catalog.discover_tables(catalog: str, schema: str, databricks_workspace_connection_id: UUID, workspace: str | UUID | None = None, max_results: int | None = None) DataFrame

Returns a list of schemas in the given catalog from Unity Catalog.

This is a wrapper function for the following API: Databricks Metadata Discovery - Discover Tables.

Parameters:
  • catalog (str) – The name of the catalog.

  • schema (str) – The name of the schema.

  • databricks_workspace_connection_id (uuid.UUID) – The ID of the Databricks workspace connection.

  • workspace (str | uuid.UUID, default=None) – The 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.

  • max_results (int, default=None) – The maximum number of results to return. If not specified, all results are returned.

Returns:

A pandas dataframe showing a list of schemas in the given catalog from Unity Catalog.

Return type:

pandas.DataFrame

sempy_labs.mirrored_azure_databricks_catalog.refresh_catalog_metadata(mirrored_azure_databricks_catalog: str | UUID, workspace: str | UUID | None = None)

Refresh Databricks catalog metadata in mirroredAzureDatabricksCatalogs Item.

This is a wrapper function for the following API: Refresh Metadata - Items RefreshCatalogMetadata.

Parameters:
  • mirrored_azure_databricks_catalog (str | uuid.UUID) – The name or ID of the mirrored Azure Databricks catalog.

  • workspace (str | uuie.UUID, default=None) – The 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