Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions labs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ commands:
- name: configure-database-profiler
description: Configure database profiler

- name: create-profiler-dashboard
description: (Experimental) Upload the profiler results as a Databricks dashboard.
flags:
- name: extract-file
description: Path Location of the Profiler Extract File
- name: source-tech
description: Name of the Source System Technology that was Profiled
- name: volume-path
description: Unity Catalog Volume to upload the profiler extract
- name: catalog-name
description: (Optional) Name of the Catalog that extract data will be uploaded to
- name: schema-name
description: (Optional) Name of the Schema that the extract tables will be uploaded to

- name: install-transpile
description: Install & optionally configure 'transpile' dependencies
flags:
Expand Down
17 changes: 17 additions & 0 deletions src/databricks/labs/lakebridge/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,23 @@ def analyze(
logger.debug(f"User: {ctx.current_user}")


@lakebridge.command()
def create_profiler_dashboard(
*,
w: WorkspaceClient,
extract_file: str,
source_tech: str,
volume_path: str,
catalog_name: str,
schema_name: str,
) -> None:
"""Deploys a profiler summary as a Databricks dashboard"""
ctx = ApplicationContext(w)
ctx.add_user_agent_extra("cmd", "create-profiler-dashboard")
ctx.dashboard_manager.upload_duckdb_to_uc_volume(extract_file, volume_path)
ctx.dashboard_manager.create_profiler_summary_dashboard(source_tech, catalog_name, schema_name)


if __name__ == "__main__":
app = lakebridge
logger = app.get_logger()
Expand Down
Loading