-
Notifications
You must be signed in to change notification settings - Fork 128
Updated dashboards deployment to use standard lakeview dashboard definitions #950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f163a31
updated dashboards to use standard lakeview dashboard definitions in …
AdityaMandiwal 54ea40c
Merge branch 'main' into feature_132
mwojtyczka 101dbd6
Updated dashboard installer to use .lvdash.json file in place of sepe…
AdityaMandiwal 8daf9b3
Updated dashboard installer to use .lvdash.json file in place of sepe…
AdityaMandiwal e019c2f
Merge branch 'main' into feature_132
mwojtyczka 78f1a23
added missing dependency
mwojtyczka 1671a79
fmt
mwojtyczka 385cd3b
fmt
mwojtyczka 373fa47
improved telemetry
mwojtyczka 153ed73
improved telemetry
mwojtyczka 16b3e7e
refactor
mwojtyczka 08ebb6e
refactor
mwojtyczka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
208 changes: 208 additions & 0 deletions
208
src/databricks/labs/dqx/dashboards/dashboard.lvdash.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,208 @@ | ||
| { | ||
| "datasets": [ | ||
| { | ||
| "name": "00_1_dq_summary", | ||
| "displayName": "00_1_dq_summary", | ||
| "queryLines": [ | ||
| "/* --title 'Data Quality Summary' */\n", | ||
| "SELECT \n", | ||
| " CASE\n", | ||
| " WHEN _errors IS NOT NULL THEN 'Errors'\n", | ||
| " WHEN _warnings IS NOT NULL THEN 'Warnings'\n", | ||
| " END AS category,\n", | ||
| " ROUND((COUNT(*) * 100.0 / (SELECT COUNT(*) FROM $catalog.schema.table)), 2) AS percentage\n", | ||
| "FROM $catalog.schema.table\n", | ||
| "GROUP BY category" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "00_2_dq_error_types", | ||
| "displayName": "00_2_dq_error_types", | ||
| "queryLines": [ | ||
| "/* --title 'Error and Warning Types Breakdown' */\n", | ||
| "WITH error_types AS (\n", | ||
| " SELECT\n", | ||
| " 'Error' AS category,\n", | ||
| " error_struct.name AS type,\n", | ||
| " COUNT(*) AS count\n", | ||
| " FROM $catalog.schema.table\n", | ||
| " LATERAL VIEW EXPLODE(_errors) exploded_errors AS error_struct\n", | ||
| " WHERE _errors IS NOT NULL\n", | ||
| " GROUP BY error_struct.name\n", | ||
| "),\n", | ||
| "warning_types AS (\n", | ||
| " SELECT\n", | ||
| " 'Warning' AS category,\n", | ||
| " warning_struct.name AS type,\n", | ||
| " COUNT(*) AS count\n", | ||
| " FROM $catalog.schema.table\n", | ||
| " LATERAL VIEW EXPLODE(_warnings) exploded_warnings AS warning_struct\n", | ||
| " WHERE _warnings IS NOT NULL\n", | ||
| " GROUP BY warning_struct.name\n", | ||
| "),\n", | ||
| "combined AS (\n", | ||
| " SELECT * FROM error_types\n", | ||
| " UNION ALL\n", | ||
| " SELECT * FROM warning_types\n", | ||
| "),\n", | ||
| "total AS (\n", | ||
| " SELECT SUM(count) AS total_count FROM combined\n", | ||
| ")\n", | ||
| "SELECT\n", | ||
| " category,\n", | ||
| " type,\n", | ||
| " count,\n", | ||
| " ROUND((count * 100.0) / total.total_count, 2) AS percentage\n", | ||
| "FROM combined, total\n", | ||
| "ORDER BY category, count DESC;" | ||
| ] | ||
| } | ||
| ], | ||
| "pages": [ | ||
| { | ||
| "name": "DQX_Quality_Dashboard", | ||
| "displayName": "DQX_Quality_Dashboard", | ||
| "layout": [ | ||
| { | ||
| "widget": { | ||
| "name": "00_1_dq_summary_widget", | ||
| "queries": [ | ||
| { | ||
| "name": "main_query", | ||
| "query": { | ||
| "datasetName": "00_1_dq_summary", | ||
| "fields": [ | ||
| { | ||
| "name": "sum(percentage)", | ||
| "expression": "SUM(`percentage`)" | ||
| }, | ||
| { | ||
| "name": "category", | ||
| "expression": "`category`" | ||
| } | ||
| ], | ||
| "disaggregated": false | ||
| } | ||
| } | ||
| ], | ||
| "spec": { | ||
| "version": 3, | ||
| "widgetType": "pie", | ||
| "encodings": { | ||
| "angle": { | ||
| "displayName": "Total Row Counts", | ||
| "fieldName": "sum(percentage)", | ||
| "scale": { | ||
| "type": "quantitative" | ||
| } | ||
| }, | ||
| "color": { | ||
| "displayName": "category", | ||
| "fieldName": "category", | ||
| "scale": { | ||
| "type": "categorical", | ||
| "mappings": [ | ||
| { | ||
| "color": "#00A972" | ||
| }, | ||
| { | ||
| "color": "#FFAB00" | ||
| }, | ||
| { | ||
|
mwojtyczka marked this conversation as resolved.
|
||
| "color": "#FF3621" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "label": { | ||
| "show": true | ||
| } | ||
| }, | ||
| "frame": { | ||
| "description": "", | ||
| "showDescription": false, | ||
| "showTitle": true, | ||
| "title": "Data Quality Summary" | ||
| } | ||
| } | ||
| }, | ||
| "position": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "width": 3, | ||
| "height": 6 | ||
| } | ||
| }, | ||
| { | ||
| "widget": { | ||
| "name": "00_2_dq_error_types_widget", | ||
| "queries": [ | ||
| { | ||
| "name": "main_query", | ||
| "query": { | ||
| "datasetName": "00_2_dq_error_types", | ||
| "fields": [ | ||
| { | ||
| "name": "Category", | ||
| "expression": "`category`" | ||
| }, | ||
| { | ||
| "name": "Type", | ||
| "expression": "`type`" | ||
| }, | ||
| { | ||
| "name": "Count", | ||
| "expression": "`count`" | ||
| }, | ||
| { | ||
| "name": "Percentage", | ||
| "expression": "`percentage`" | ||
| } | ||
| ], | ||
| "disaggregated": true | ||
| } | ||
| } | ||
| ], | ||
| "spec": { | ||
| "version": 2, | ||
| "widgetType": "table", | ||
| "encodings": { | ||
| "columns": [ | ||
| { | ||
| "displayName": "Category", | ||
| "fieldName": "Category" | ||
| }, | ||
| { | ||
| "displayName": "Type", | ||
| "fieldName": "Type" | ||
| }, | ||
| { | ||
| "displayName": "Count", | ||
| "fieldName": "Count" | ||
| }, | ||
| { | ||
| "displayName": "Percentage (%)", | ||
| "fieldName": "Percentage" | ||
| } | ||
| ] | ||
| }, | ||
| "frame": { | ||
| "description": "", | ||
| "showDescription": false, | ||
| "showTitle": true, | ||
| "title": "Error and Warning Types Breakdown" | ||
| } | ||
| } | ||
| }, | ||
| "position": { | ||
| "x": 3, | ||
| "y": 0, | ||
| "width": 3, | ||
| "height": 6 | ||
| } | ||
| } | ||
| ], | ||
| "pageType": "PAGE_TYPE_CANVAS" | ||
| } | ||
| ] | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.