databricks-demos / dbdemos

Demos to implement your Databricks Lakehouse
Other
255 stars 80 forks source link

BUG: system tables demo breaks when trying to install dashboards #64

Open dmoore247 opened 10 months ago

dmoore247 commented 10 months ago

While running on UC enabled cluster, attempting to install with dashboards failes.

dbdemos.install('uc-04-system-tables', catalog="douglas_moore", schema="system_tables", skip_dashboards = False)

Error:

WARN: Couldn't update ownership of dashboard 958ec503-ea68-4568-aef5-d267e021ea8c to current user. Will create a new one.
WARNING:  Could not change dashboard ownership Cost Management and Forecasting (powered by UC System Tables) - loca. Import might fail. Check dashboard https://e2-demo-field-eng.cloud.databricks.com/sql/dashboards/958ec503-ea68-4568-aef5-d267e021ea8c
    ERROR loading dashboard Cost Management and Forecasting (powered by UC System Tables) - loca - can't update query or query without vis. Shouldn't happen: {'message': "You don't have 'Modify' permission to resource Query(bd74b207-d2a0-448c-9b6d-5f01d9aebcc4)."} - {'data_source_id': '98205bea-1c73-4a9a-8da4-910e53143bea', 'query': "--param query - the import needs the  query to be run first even empty.\nCREATE SCHEMA IF NOT EXISTS `douglas_moore`.`system_tables`;\nCREATE TABLE IF NOT EXISTS `douglas_moore`.`system_tables`.billing_forecast (sku STRING, workspace_id STRING);\nINSERT INTO `douglas_moore`.`system_tables`.billing_forecast (sku, workspace_id) SELECT 'ALL', 'ALL'\n  WHERE NOT EXISTS (SELECT * FROM  `douglas_moore`.`system_tables`.billing_forecast);\n\n\nselect distinct(workspace_id) from `douglas_moore`.`system_tables`.billing_forecast order by workspace_id DESC;", 'name': 'System Tables - Distinct workspace id', 'description': None, 'schedule': None, 'tags': [], 'options': {'parent': 'folders/1580401252621742', 'apply_auto_limit': True, 'folder_node_status': 'ACTIVE', 'folder_node_internal_name': 'tree/2065090636588215', 'visualization_control_order': [], 'parameters': [], 'schema': None, 'catalog': None}, 'parent': 'folders/3416709542970793'} - bd74b207-d2a0-448c-9b6d-5f01d9aebcc4
dmoore247 commented 10 months ago

Dashboard's folder is empty

image
QuentinAmbard commented 10 months ago

hey I think it's our internal workspace can you try deleting the dashboard with the ID you see in the error? Also what's strange is the dashboard name, "local" (it should be dashboard_name + " - " + ) How are your running the installation? We can catchup on slack if it's easier