databricks-labs-lakebridge 0.10.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- databricks/__init__.py +3 -0
- databricks/labs/__init__.py +3 -0
- databricks/labs/lakebridge/__about__.py +2 -0
- databricks/labs/lakebridge/__init__.py +11 -0
- databricks/labs/lakebridge/assessments/configure_assessment.py +194 -0
- databricks/labs/lakebridge/assessments/pipeline.py +188 -0
- databricks/labs/lakebridge/assessments/profiler_config.py +30 -0
- databricks/labs/lakebridge/base_install.py +12 -0
- databricks/labs/lakebridge/cli.py +449 -0
- databricks/labs/lakebridge/config.py +192 -0
- databricks/labs/lakebridge/connections/__init__.py +0 -0
- databricks/labs/lakebridge/connections/credential_manager.py +89 -0
- databricks/labs/lakebridge/connections/database_manager.py +98 -0
- databricks/labs/lakebridge/connections/env_getter.py +13 -0
- databricks/labs/lakebridge/contexts/__init__.py +0 -0
- databricks/labs/lakebridge/contexts/application.py +133 -0
- databricks/labs/lakebridge/coverage/__init__.py +0 -0
- databricks/labs/lakebridge/coverage/commons.py +223 -0
- databricks/labs/lakebridge/coverage/lakebridge_snow_transpilation_coverage.py +29 -0
- databricks/labs/lakebridge/coverage/local_report.py +9 -0
- databricks/labs/lakebridge/coverage/sqlglot_snow_transpilation_coverage.py +5 -0
- databricks/labs/lakebridge/coverage/sqlglot_tsql_transpilation_coverage.py +5 -0
- databricks/labs/lakebridge/deployment/__init__.py +0 -0
- databricks/labs/lakebridge/deployment/configurator.py +199 -0
- databricks/labs/lakebridge/deployment/dashboard.py +140 -0
- databricks/labs/lakebridge/deployment/installation.py +125 -0
- databricks/labs/lakebridge/deployment/job.py +147 -0
- databricks/labs/lakebridge/deployment/recon.py +145 -0
- databricks/labs/lakebridge/deployment/table.py +30 -0
- databricks/labs/lakebridge/deployment/upgrade_common.py +124 -0
- databricks/labs/lakebridge/discovery/table.py +36 -0
- databricks/labs/lakebridge/discovery/table_definition.py +23 -0
- databricks/labs/lakebridge/discovery/tsql_table_definition.py +185 -0
- databricks/labs/lakebridge/errors/exceptions.py +1 -0
- databricks/labs/lakebridge/helpers/__init__.py +0 -0
- databricks/labs/lakebridge/helpers/db_sql.py +24 -0
- databricks/labs/lakebridge/helpers/execution_time.py +20 -0
- databricks/labs/lakebridge/helpers/file_utils.py +64 -0
- databricks/labs/lakebridge/helpers/metastore.py +164 -0
- databricks/labs/lakebridge/helpers/recon_config_utils.py +176 -0
- databricks/labs/lakebridge/helpers/string_utils.py +62 -0
- databricks/labs/lakebridge/helpers/telemetry_utils.py +13 -0
- databricks/labs/lakebridge/helpers/validation.py +101 -0
- databricks/labs/lakebridge/install.py +849 -0
- databricks/labs/lakebridge/intermediate/__init__.py +0 -0
- databricks/labs/lakebridge/intermediate/dag.py +88 -0
- databricks/labs/lakebridge/intermediate/engine_adapter.py +0 -0
- databricks/labs/lakebridge/intermediate/root_tables.py +44 -0
- databricks/labs/lakebridge/jvmproxy.py +56 -0
- databricks/labs/lakebridge/lineage.py +42 -0
- databricks/labs/lakebridge/reconcile/__init__.py +0 -0
- databricks/labs/lakebridge/reconcile/compare.py +414 -0
- databricks/labs/lakebridge/reconcile/connectors/__init__.py +0 -0
- databricks/labs/lakebridge/reconcile/connectors/data_source.py +72 -0
- databricks/labs/lakebridge/reconcile/connectors/databricks.py +87 -0
- databricks/labs/lakebridge/reconcile/connectors/jdbc_reader.py +41 -0
- databricks/labs/lakebridge/reconcile/connectors/oracle.py +108 -0
- databricks/labs/lakebridge/reconcile/connectors/secrets.py +30 -0
- databricks/labs/lakebridge/reconcile/connectors/snowflake.py +173 -0
- databricks/labs/lakebridge/reconcile/connectors/source_adapter.py +30 -0
- databricks/labs/lakebridge/reconcile/connectors/sql_server.py +132 -0
- databricks/labs/lakebridge/reconcile/constants.py +37 -0
- databricks/labs/lakebridge/reconcile/exception.py +42 -0
- databricks/labs/lakebridge/reconcile/execute.py +920 -0
- databricks/labs/lakebridge/reconcile/query_builder/__init__.py +0 -0
- databricks/labs/lakebridge/reconcile/query_builder/aggregate_query.py +293 -0
- databricks/labs/lakebridge/reconcile/query_builder/base.py +138 -0
- databricks/labs/lakebridge/reconcile/query_builder/count_query.py +33 -0
- databricks/labs/lakebridge/reconcile/query_builder/expression_generator.py +292 -0
- databricks/labs/lakebridge/reconcile/query_builder/hash_query.py +91 -0
- databricks/labs/lakebridge/reconcile/query_builder/sampling_query.py +123 -0
- databricks/labs/lakebridge/reconcile/query_builder/threshold_query.py +231 -0
- databricks/labs/lakebridge/reconcile/recon_capture.py +635 -0
- databricks/labs/lakebridge/reconcile/recon_config.py +363 -0
- databricks/labs/lakebridge/reconcile/recon_output_config.py +85 -0
- databricks/labs/lakebridge/reconcile/runner.py +97 -0
- databricks/labs/lakebridge/reconcile/sampler.py +239 -0
- databricks/labs/lakebridge/reconcile/schema_compare.py +126 -0
- databricks/labs/lakebridge/resources/__init__.py +0 -0
- databricks/labs/lakebridge/resources/config/credentials.yml +33 -0
- databricks/labs/lakebridge/resources/reconcile/__init__.py +0 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/__init__.py +0 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/00_0_aggregate_recon_header.md +6 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/01_0_recon_id.filter.yml +6 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/01_1_executed_by.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/01_2_started_at.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/02_0_source_type.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/02_1_source_table.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/02_2_target_table.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/04_0_aggregate_summary_table.sql +46 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/05_0_aggregate_recon_drilldown_header.md +2 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/06_0_recon_id.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/06_1_category.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/06_2_aggregate_type.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/07_0_target_table.filter.yml +4 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/07_1_source_table.filter.yml +4 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/08_0_aggregate_details_table.sql +92 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/09_0_aggregate_missing_mismatch_header.md +1 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/10_0_aggr_mismatched_records.sql +19 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/11_0_aggr_missing_in_databricks.sql +19 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/11_1_aggr_missing_in_source.sql +19 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/aggregate_reconciliation_metrics/dashboard.yml +365 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/00_0_recon_main.md +3 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/01_0_recon_id.filter.yml +6 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/01_1_report_type.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/01_2_executed_by.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/02_0_source_type.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/02_1_source_table.filter.yml +6 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/02_2_target_table.filter.yml +6 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/03_0_started_at.filter.yml +5 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/05_0_summary_table.sql +38 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/06_0_schema_comparison_header.md +3 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/07_0_schema_details_table.sql +42 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/08_0_drill_down_header.md +3 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/09_0_recon_id.filter.yml +4 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/09_1_category.filter.yml +4 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/10_0_target_table.filter.yml +4 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/10_1_source_table.filter.yml +4 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/11_0_recon_details_pivot.sql +40 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/12_0_daily_data_validation_issue_header.md +3 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/13_0_success_fail_.filter.yml +4 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/14_0_failed_recon_ids.sql +15 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/15_0_total_failed_runs.sql +10 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/15_1_failed_targets.sql +10 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/15_2_successful_targets.sql +10 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/16_0_missing_mismatch_header.md +1 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/17_0_mismatched_records.sql +14 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/17_1_threshold_mismatches.sql +14 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/18_0_missing_in_databricks.sql +14 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/18_1_missing_in_source.sql +14 -0
- databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/dashboard.yml +545 -0
- databricks/labs/lakebridge/resources/reconcile/queries/__init__.py +0 -0
- databricks/labs/lakebridge/resources/reconcile/queries/installation/__init__.py +0 -0
- databricks/labs/lakebridge/resources/reconcile/queries/installation/aggregate_details.sql +7 -0
- databricks/labs/lakebridge/resources/reconcile/queries/installation/aggregate_metrics.sql +15 -0
- databricks/labs/lakebridge/resources/reconcile/queries/installation/aggregate_rules.sql +6 -0
- databricks/labs/lakebridge/resources/reconcile/queries/installation/details.sql +7 -0
- databricks/labs/lakebridge/resources/reconcile/queries/installation/main.sql +24 -0
- databricks/labs/lakebridge/resources/reconcile/queries/installation/metrics.sql +21 -0
- databricks/labs/lakebridge/transpiler/__init__.py +0 -0
- databricks/labs/lakebridge/transpiler/execute.py +423 -0
- databricks/labs/lakebridge/transpiler/lsp/__init__.py +0 -0
- databricks/labs/lakebridge/transpiler/lsp/lsp_engine.py +564 -0
- databricks/labs/lakebridge/transpiler/sqlglot/__init__.py +0 -0
- databricks/labs/lakebridge/transpiler/sqlglot/dialect_utils.py +30 -0
- databricks/labs/lakebridge/transpiler/sqlglot/generator/__init__.py +0 -0
- databricks/labs/lakebridge/transpiler/sqlglot/generator/databricks.py +771 -0
- databricks/labs/lakebridge/transpiler/sqlglot/lca_utils.py +138 -0
- databricks/labs/lakebridge/transpiler/sqlglot/local_expression.py +197 -0
- databricks/labs/lakebridge/transpiler/sqlglot/parsers/__init__.py +0 -0
- databricks/labs/lakebridge/transpiler/sqlglot/parsers/oracle.py +23 -0
- databricks/labs/lakebridge/transpiler/sqlglot/parsers/presto.py +202 -0
- databricks/labs/lakebridge/transpiler/sqlglot/parsers/snowflake.py +535 -0
- databricks/labs/lakebridge/transpiler/sqlglot/sqlglot_engine.py +203 -0
- databricks/labs/lakebridge/transpiler/transpile_engine.py +49 -0
- databricks/labs/lakebridge/transpiler/transpile_status.py +68 -0
- databricks/labs/lakebridge/uninstall.py +28 -0
- databricks/labs/lakebridge/upgrades/v0.4.0_add_main_table_operation_name_column.py +80 -0
- databricks/labs/lakebridge/upgrades/v0.6.0_alter_metrics_datatype.py +51 -0
- databricks_labs_lakebridge-0.10.0.dist-info/METADATA +58 -0
- databricks_labs_lakebridge-0.10.0.dist-info/RECORD +171 -0
- databricks_labs_lakebridge-0.10.0.dist-info/WHEEL +4 -0
- databricks_labs_lakebridge-0.10.0.dist-info/entry_points.txt +2 -0
- databricks_labs_lakebridge-0.10.0.dist-info/licenses/LICENSE +69 -0
- databricks_labs_lakebridge-0.10.0.dist-info/licenses/NOTICE +42 -0
- docs/lakebridge/src/components/Button.tsx +81 -0
- docs/lakebridge/src/css/custom.css +167 -0
- docs/lakebridge/src/css/table.css +20 -0
- docs/lakebridge/src/pages/index.tsx +57 -0
- docs/lakebridge/src/theme/Footer/index.tsx +24 -0
- docs/lakebridge/src/theme/Layout/index.tsx +18 -0
@@ -0,0 +1 @@
|
|
1
|
+
# Visualization of Missing and Mismatched Records
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/* --title 'Mismatched Records' --width 3 */
|
2
|
+
SELECT
|
3
|
+
main.recon_id,
|
4
|
+
CONCAT_WS('.', main.target_table.catalog, main.target_table.schema, main.target_table.table_name) AS target_table,
|
5
|
+
metrics.recon_metrics.column_comparison.absolute_mismatch AS absolute_mismatch,
|
6
|
+
main.start_ts AS start_ts
|
7
|
+
FROM
|
8
|
+
remorph.reconcile.main main
|
9
|
+
INNER JOIN remorph.reconcile.metrics metrics
|
10
|
+
ON main.recon_table_id = metrics.recon_table_id
|
11
|
+
ORDER BY
|
12
|
+
metrics.inserted_ts DESC,
|
13
|
+
main.recon_id,
|
14
|
+
main.target_table.table_name
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/* --title 'Threshold Mismatches' --width 3 */
|
2
|
+
SELECT
|
3
|
+
main.recon_id,
|
4
|
+
CONCAT_WS('.', main.target_table.catalog, main.target_table.schema, main.target_table.table_name) AS target_table,
|
5
|
+
metrics.recon_metrics.column_comparison.threshold_mismatch AS threshold_mismatch,
|
6
|
+
main.start_ts AS start_ts
|
7
|
+
FROM
|
8
|
+
remorph.reconcile.main main
|
9
|
+
INNER JOIN remorph.reconcile.metrics metrics
|
10
|
+
ON main.recon_table_id = metrics.recon_table_id
|
11
|
+
ORDER BY
|
12
|
+
metrics.inserted_ts DESC,
|
13
|
+
main.recon_id,
|
14
|
+
main.target_table.table_name
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/* --title 'Missing in Databricks' --width 3 */
|
2
|
+
SELECT
|
3
|
+
main.recon_id,
|
4
|
+
CONCAT(main.target_table.catalog, '.', main.target_table.schema, '.', main.target_table.table_name) AS target_table,
|
5
|
+
metrics.recon_metrics.row_comparison.missing_in_target AS missing_in_target,
|
6
|
+
main.start_ts AS start_ts
|
7
|
+
FROM
|
8
|
+
remorph.reconcile.main main
|
9
|
+
INNER JOIN remorph.reconcile.metrics metrics
|
10
|
+
ON main.recon_table_id = metrics.recon_table_id
|
11
|
+
ORDER BY
|
12
|
+
metrics.inserted_ts DESC,
|
13
|
+
main.recon_id,
|
14
|
+
main.target_table.table_name
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/* --title 'Missing in Source' --width 3 */
|
2
|
+
SELECT
|
3
|
+
main.recon_id,
|
4
|
+
CONCAT(main.target_table.catalog, '.', main.target_table.schema, '.', main.target_table.table_name) AS target_table,
|
5
|
+
metrics.recon_metrics.row_comparison.missing_in_source AS missing_in_source,
|
6
|
+
main.start_ts AS start_ts
|
7
|
+
FROM
|
8
|
+
remorph.reconcile.main main
|
9
|
+
INNER JOIN remorph.reconcile.metrics metrics
|
10
|
+
ON main.recon_table_id = metrics.recon_table_id
|
11
|
+
ORDER BY
|
12
|
+
metrics.inserted_ts DESC,
|
13
|
+
main.recon_id,
|
14
|
+
main.target_table.table_name
|
databricks/labs/lakebridge/resources/reconcile/dashboards/reconciliation_metrics/dashboard.yml
ADDED
@@ -0,0 +1,545 @@
|
|
1
|
+
display_name: "Reconciliation Metrics"
|
2
|
+
tiles:
|
3
|
+
05_0_summary_table:
|
4
|
+
overrides:
|
5
|
+
spec:
|
6
|
+
withRowNumber: true
|
7
|
+
encodings:
|
8
|
+
columns:
|
9
|
+
- booleanValues:
|
10
|
+
- 'false'
|
11
|
+
- 'true'
|
12
|
+
displayAs: string
|
13
|
+
fieldName: recon_id
|
14
|
+
title: recon_id
|
15
|
+
type: string
|
16
|
+
cellFormat:
|
17
|
+
default:
|
18
|
+
foregroundColor:
|
19
|
+
rules:
|
20
|
+
- if:
|
21
|
+
column: status
|
22
|
+
fn: '='
|
23
|
+
literal: 'true'
|
24
|
+
value:
|
25
|
+
foregroundColor: '#3BD973'
|
26
|
+
- if:
|
27
|
+
column: status
|
28
|
+
fn: '='
|
29
|
+
literal: 'false'
|
30
|
+
value:
|
31
|
+
foregroundColor: '#E92828'
|
32
|
+
- booleanValues:
|
33
|
+
- 'false'
|
34
|
+
- 'true'
|
35
|
+
displayAs: string
|
36
|
+
fieldName: source_type
|
37
|
+
title: source_type
|
38
|
+
type: string
|
39
|
+
- booleanValues:
|
40
|
+
- 'false'
|
41
|
+
- 'true'
|
42
|
+
displayAs: string
|
43
|
+
fieldName: report_type
|
44
|
+
title: report_type
|
45
|
+
type: string
|
46
|
+
- booleanValues:
|
47
|
+
- 'false'
|
48
|
+
- 'true'
|
49
|
+
displayAs: string
|
50
|
+
fieldName: source_catalog
|
51
|
+
title: source_catalog
|
52
|
+
type: string
|
53
|
+
- booleanValues:
|
54
|
+
- 'false'
|
55
|
+
- 'true'
|
56
|
+
displayAs: string
|
57
|
+
fieldName: source_schema
|
58
|
+
title: source_schema
|
59
|
+
type: string
|
60
|
+
- booleanValues:
|
61
|
+
- 'false'
|
62
|
+
- 'true'
|
63
|
+
displayAs: string
|
64
|
+
fieldName: source_table_name
|
65
|
+
title: source_table_name
|
66
|
+
type: string
|
67
|
+
- booleanValues:
|
68
|
+
- 'false'
|
69
|
+
- 'true'
|
70
|
+
displayAs: string
|
71
|
+
fieldName: source_table
|
72
|
+
title: source_table
|
73
|
+
type: string
|
74
|
+
- booleanValues:
|
75
|
+
- 'false'
|
76
|
+
- 'true'
|
77
|
+
displayAs: string
|
78
|
+
fieldName: target_catalog
|
79
|
+
title: target_catalog
|
80
|
+
type: string
|
81
|
+
- booleanValues:
|
82
|
+
- 'false'
|
83
|
+
- 'true'
|
84
|
+
displayAs: string
|
85
|
+
fieldName: target_schema
|
86
|
+
title: target_schema
|
87
|
+
type: string
|
88
|
+
- booleanValues:
|
89
|
+
- 'false'
|
90
|
+
- 'true'
|
91
|
+
displayAs: string
|
92
|
+
fieldName: target_table_name
|
93
|
+
title: target_table_name
|
94
|
+
type: string
|
95
|
+
- booleanValues:
|
96
|
+
- 'false'
|
97
|
+
- 'true'
|
98
|
+
displayAs: string
|
99
|
+
fieldName: target_table
|
100
|
+
title: target_table
|
101
|
+
type: string
|
102
|
+
- booleanValues:
|
103
|
+
- 'false'
|
104
|
+
- 'true'
|
105
|
+
displayAs: string
|
106
|
+
fieldName: status
|
107
|
+
title: status
|
108
|
+
type: string
|
109
|
+
- booleanValues:
|
110
|
+
- 'false'
|
111
|
+
- 'true'
|
112
|
+
displayAs: string
|
113
|
+
fieldName: exception
|
114
|
+
title: exception
|
115
|
+
type: string
|
116
|
+
- booleanValues:
|
117
|
+
- 'false'
|
118
|
+
- 'true'
|
119
|
+
displayAs: string
|
120
|
+
fieldName: missing_in_source
|
121
|
+
title: missing_in_source
|
122
|
+
type: string
|
123
|
+
- booleanValues:
|
124
|
+
- 'false'
|
125
|
+
- 'true'
|
126
|
+
displayAs: string
|
127
|
+
fieldName: missing_in_target
|
128
|
+
title: missing_in_target
|
129
|
+
type: string
|
130
|
+
- booleanValues:
|
131
|
+
- 'false'
|
132
|
+
- 'true'
|
133
|
+
displayAs: string
|
134
|
+
fieldName: absolute_mismatch
|
135
|
+
title: absolute_mismatch
|
136
|
+
type: string
|
137
|
+
- booleanValues:
|
138
|
+
- 'false'
|
139
|
+
- 'true'
|
140
|
+
displayAs: string
|
141
|
+
fieldName: threshold_mismatch
|
142
|
+
title: threshold_mismatch
|
143
|
+
type: string
|
144
|
+
- booleanValues:
|
145
|
+
- 'false'
|
146
|
+
- 'true'
|
147
|
+
displayAs: string
|
148
|
+
fieldName: mismatch_columns
|
149
|
+
title: mismatch_columns
|
150
|
+
type: string
|
151
|
+
- booleanValues:
|
152
|
+
- 'false'
|
153
|
+
- 'true'
|
154
|
+
displayAs: string
|
155
|
+
fieldName: schema_comparison
|
156
|
+
title: schema_comparison
|
157
|
+
type: string
|
158
|
+
- booleanValues:
|
159
|
+
- 'false'
|
160
|
+
- 'true'
|
161
|
+
displayAs: string
|
162
|
+
fieldName: executed_by
|
163
|
+
title: executed_by
|
164
|
+
type: string
|
165
|
+
- booleanValues:
|
166
|
+
- 'false'
|
167
|
+
- 'true'
|
168
|
+
displayAs: datetime
|
169
|
+
fieldName: start_ts
|
170
|
+
title: start_ts
|
171
|
+
type: datetime
|
172
|
+
dateTimeFormat: 'YYYY-MM-DD HH:mm:ss.SSS'
|
173
|
+
- booleanValues:
|
174
|
+
- 'false'
|
175
|
+
- 'true'
|
176
|
+
displayAs: datetime
|
177
|
+
fieldName: end_ts
|
178
|
+
title: end_ts
|
179
|
+
type: datetime
|
180
|
+
dateTimeFormat: 'YYYY-MM-DD HH:mm:ss.SSS'
|
181
|
+
07_0_schema_details_table:
|
182
|
+
overrides:
|
183
|
+
spec:
|
184
|
+
withRowNumber: true
|
185
|
+
encodings:
|
186
|
+
columns:
|
187
|
+
- booleanValues:
|
188
|
+
- 'false'
|
189
|
+
- 'true'
|
190
|
+
displayAs: string
|
191
|
+
fieldName: recon_id
|
192
|
+
title: recon_id
|
193
|
+
type: string
|
194
|
+
cellFormat:
|
195
|
+
default:
|
196
|
+
foregroundColor:
|
197
|
+
rules:
|
198
|
+
- if:
|
199
|
+
column: is_valid
|
200
|
+
fn: '='
|
201
|
+
literal: 'false'
|
202
|
+
value:
|
203
|
+
foregroundColor: '#E92828'
|
204
|
+
- if:
|
205
|
+
column: is_valid
|
206
|
+
fn: '='
|
207
|
+
literal: 'true'
|
208
|
+
value:
|
209
|
+
foregroundColor: '#3BD973'
|
210
|
+
- booleanValues:
|
211
|
+
- 'false'
|
212
|
+
- 'true'
|
213
|
+
displayAs: string
|
214
|
+
fieldName: source_catalog
|
215
|
+
title: source_catalog
|
216
|
+
type: string
|
217
|
+
- booleanValues:
|
218
|
+
- 'false'
|
219
|
+
- 'true'
|
220
|
+
displayAs: string
|
221
|
+
fieldName: source_schema
|
222
|
+
title: source_schema
|
223
|
+
type: string
|
224
|
+
- booleanValues:
|
225
|
+
- 'false'
|
226
|
+
- 'true'
|
227
|
+
displayAs: string
|
228
|
+
fieldName: source_table_name
|
229
|
+
title: source_table_name
|
230
|
+
type: string
|
231
|
+
- booleanValues:
|
232
|
+
- 'false'
|
233
|
+
- 'true'
|
234
|
+
displayAs: string
|
235
|
+
fieldName: source_table
|
236
|
+
title: source_table
|
237
|
+
type: string
|
238
|
+
- booleanValues:
|
239
|
+
- 'false'
|
240
|
+
- 'true'
|
241
|
+
displayAs: string
|
242
|
+
fieldName: target_catalog
|
243
|
+
title: target_catalog
|
244
|
+
type: string
|
245
|
+
- booleanValues:
|
246
|
+
- 'false'
|
247
|
+
- 'true'
|
248
|
+
displayAs: string
|
249
|
+
fieldName: target_schema
|
250
|
+
title: target_schema
|
251
|
+
type: string
|
252
|
+
- booleanValues:
|
253
|
+
- 'false'
|
254
|
+
- 'true'
|
255
|
+
displayAs: string
|
256
|
+
fieldName: target_table_name
|
257
|
+
title: target_table_name
|
258
|
+
type: string
|
259
|
+
- booleanValues:
|
260
|
+
- 'false'
|
261
|
+
- 'true'
|
262
|
+
displayAs: string
|
263
|
+
fieldName: target_table
|
264
|
+
title: target_table
|
265
|
+
type: string
|
266
|
+
- booleanValues:
|
267
|
+
- 'false'
|
268
|
+
- 'true'
|
269
|
+
displayAs: string
|
270
|
+
fieldName: source_column
|
271
|
+
title: source_column
|
272
|
+
type: string
|
273
|
+
- booleanValues:
|
274
|
+
- 'false'
|
275
|
+
- 'true'
|
276
|
+
displayAs: string
|
277
|
+
fieldName: source_datatype
|
278
|
+
title: source_datatype
|
279
|
+
type: string
|
280
|
+
- booleanValues:
|
281
|
+
- 'false'
|
282
|
+
- 'true'
|
283
|
+
displayAs: string
|
284
|
+
fieldName: databricks_column
|
285
|
+
title: databricks_column
|
286
|
+
type: string
|
287
|
+
- booleanValues:
|
288
|
+
- 'false'
|
289
|
+
- 'true'
|
290
|
+
displayAs: string
|
291
|
+
fieldName: databricks_datatype
|
292
|
+
title: databricks_datatype
|
293
|
+
type: string
|
294
|
+
- booleanValues:
|
295
|
+
- 'false'
|
296
|
+
- 'true'
|
297
|
+
displayAs: string
|
298
|
+
fieldName: is_valid
|
299
|
+
title: is_valid
|
300
|
+
type: string
|
301
|
+
11_0_recon_details_pivot:
|
302
|
+
overrides:
|
303
|
+
spec:
|
304
|
+
version: 3
|
305
|
+
widgetType: pivot
|
306
|
+
encodings:
|
307
|
+
rows:
|
308
|
+
- fieldName: dd_recon_id
|
309
|
+
displayName: recon_id
|
310
|
+
- fieldName: dd_source_table
|
311
|
+
displayName: source_table
|
312
|
+
- fieldName: dd_target_table
|
313
|
+
displayName: target_table
|
314
|
+
- fieldName: dd_recon_type
|
315
|
+
displayName: recon_type
|
316
|
+
- fieldName: rn
|
317
|
+
displayName: rn
|
318
|
+
columns:
|
319
|
+
- fieldName: key
|
320
|
+
displayName: key
|
321
|
+
cell:
|
322
|
+
fieldName: value
|
323
|
+
cellType: text
|
324
|
+
displayName: value
|
325
|
+
14_0_failed_recon_ids:
|
326
|
+
overrides:
|
327
|
+
spec:
|
328
|
+
version: 3
|
329
|
+
widgetType: bar
|
330
|
+
encodings:
|
331
|
+
x:
|
332
|
+
fieldName: t_table
|
333
|
+
scale:
|
334
|
+
type: categorical
|
335
|
+
sort:
|
336
|
+
by: y-reversed
|
337
|
+
displayName: Target table
|
338
|
+
'y':
|
339
|
+
fieldName: countdistinct(rec_id)
|
340
|
+
scale:
|
341
|
+
type: quantitative
|
342
|
+
displayName: Count of Unique Recon Ids
|
343
|
+
label:
|
344
|
+
show: true
|
345
|
+
queries:
|
346
|
+
- name: main_query
|
347
|
+
query:
|
348
|
+
datasetName: 14_0_failed_recon_ids
|
349
|
+
fields:
|
350
|
+
- name: t_table
|
351
|
+
expression: '`t_table`'
|
352
|
+
- name: countdistinct(rec_id)
|
353
|
+
expression: COUNT(DISTINCT `rec_id`)
|
354
|
+
disaggregated: false
|
355
|
+
15_0_total_failed_runs:
|
356
|
+
overrides:
|
357
|
+
spec:
|
358
|
+
version: 2
|
359
|
+
widgetType: counter
|
360
|
+
encodings:
|
361
|
+
value:
|
362
|
+
fieldName: countdistinct(rec_id)
|
363
|
+
displayName: countdistinct(rec_id)
|
364
|
+
queries:
|
365
|
+
- name: main_query
|
366
|
+
query:
|
367
|
+
datasetName: 15_0_total_failed_runs
|
368
|
+
fields:
|
369
|
+
- name: countdistinct(rec_id)
|
370
|
+
expression: 'COUNT(DISTINCT `rec_id`)'
|
371
|
+
disaggregated: false
|
372
|
+
15_1_failed_targets:
|
373
|
+
overrides:
|
374
|
+
spec:
|
375
|
+
version: 2
|
376
|
+
widgetType: counter
|
377
|
+
encodings:
|
378
|
+
value:
|
379
|
+
fieldName: countdistinct(t_table)
|
380
|
+
displayName: countdistinct(t_table)
|
381
|
+
queries:
|
382
|
+
- name: main_query
|
383
|
+
query:
|
384
|
+
datasetName: 15_1_failed_targets
|
385
|
+
fields:
|
386
|
+
- name: countdistinct(t_table)
|
387
|
+
expression: 'COUNT(DISTINCT `t_table`)'
|
388
|
+
disaggregated: false
|
389
|
+
15_2_successful_targets:
|
390
|
+
overrides:
|
391
|
+
spec:
|
392
|
+
version: 2
|
393
|
+
widgetType: counter
|
394
|
+
encodings:
|
395
|
+
value:
|
396
|
+
fieldName: countdistinct(t_table)
|
397
|
+
displayName: countdistinct(t_table)
|
398
|
+
queries:
|
399
|
+
- name: main_query
|
400
|
+
query:
|
401
|
+
datasetName: 15_2_successful_targets
|
402
|
+
fields:
|
403
|
+
- name: countdistinct(t_table)
|
404
|
+
expression: 'COUNT(DISTINCT `t_table`)'
|
405
|
+
disaggregated: false
|
406
|
+
17_0_mismatched_records:
|
407
|
+
overrides:
|
408
|
+
queries:
|
409
|
+
- name: main_query
|
410
|
+
query:
|
411
|
+
datasetName: 17_0_mismatched_records
|
412
|
+
fields:
|
413
|
+
- name: target_table
|
414
|
+
expression: '`target_table`'
|
415
|
+
- name: hourly(start_ts)
|
416
|
+
expression: 'DATE_TRUNC("HOUR", `start_ts`)'
|
417
|
+
- name: absolute_mismatch
|
418
|
+
expression: '`absolute_mismatch`'
|
419
|
+
disaggregated: true
|
420
|
+
spec:
|
421
|
+
version: 3
|
422
|
+
widgetType: area
|
423
|
+
encodings:
|
424
|
+
x:
|
425
|
+
fieldName: hourly(start_ts)
|
426
|
+
scale:
|
427
|
+
type: temporal
|
428
|
+
displayName: start_ts
|
429
|
+
'y':
|
430
|
+
fieldName: absolute_mismatch
|
431
|
+
scale:
|
432
|
+
type: quantitative
|
433
|
+
displayName: absolute_mismatch
|
434
|
+
color:
|
435
|
+
fieldName: target_table
|
436
|
+
scale:
|
437
|
+
type: categorical
|
438
|
+
displayName: target_table
|
439
|
+
label:
|
440
|
+
show: false
|
441
|
+
17_1_threshold_mismatches:
|
442
|
+
overrides:
|
443
|
+
queries:
|
444
|
+
- name: main_query
|
445
|
+
query:
|
446
|
+
datasetName: 17_1_threshold_mismatches
|
447
|
+
fields:
|
448
|
+
- name: target_table
|
449
|
+
expression: '`target_table`'
|
450
|
+
- name: hourly(start_ts)
|
451
|
+
expression: 'DATE_TRUNC("HOUR", `start_ts`)'
|
452
|
+
- name: threshold_mismatch
|
453
|
+
expression: '`threshold_mismatch`'
|
454
|
+
disaggregated: true
|
455
|
+
spec:
|
456
|
+
version: 3
|
457
|
+
widgetType: area
|
458
|
+
encodings:
|
459
|
+
x:
|
460
|
+
fieldName: hourly(start_ts)
|
461
|
+
scale:
|
462
|
+
type: temporal
|
463
|
+
displayName: start_ts
|
464
|
+
'y':
|
465
|
+
fieldName: threshold_mismatch
|
466
|
+
scale:
|
467
|
+
type: quantitative
|
468
|
+
displayName: threshold_mismatch
|
469
|
+
color:
|
470
|
+
fieldName: target_table
|
471
|
+
scale:
|
472
|
+
type: categorical
|
473
|
+
displayName: target_table
|
474
|
+
label:
|
475
|
+
show: false
|
476
|
+
18_0_missing_in_databricks:
|
477
|
+
overrides:
|
478
|
+
queries:
|
479
|
+
- name: main_query
|
480
|
+
query:
|
481
|
+
datasetName: 18_0_missing_in_databricks
|
482
|
+
fields:
|
483
|
+
- name: target_table
|
484
|
+
expression: '`target_table`'
|
485
|
+
- name: hourly(start_ts)
|
486
|
+
expression: 'DATE_TRUNC("HOUR", `start_ts`)'
|
487
|
+
- name: missing_in_target
|
488
|
+
expression: '`missing_in_target`'
|
489
|
+
disaggregated: true
|
490
|
+
spec:
|
491
|
+
version: 3
|
492
|
+
widgetType: area
|
493
|
+
encodings:
|
494
|
+
x:
|
495
|
+
fieldName: hourly(start_ts)
|
496
|
+
scale:
|
497
|
+
type: temporal
|
498
|
+
displayName: start_ts
|
499
|
+
'y':
|
500
|
+
fieldName: missing_in_target
|
501
|
+
scale:
|
502
|
+
type: quantitative
|
503
|
+
displayName: missing_in_target
|
504
|
+
color:
|
505
|
+
fieldName: target_table
|
506
|
+
scale:
|
507
|
+
type: categorical
|
508
|
+
displayName: target_table
|
509
|
+
label:
|
510
|
+
show: false
|
511
|
+
18_1_missing_in_source:
|
512
|
+
overrides:
|
513
|
+
queries:
|
514
|
+
- name: main_query
|
515
|
+
query:
|
516
|
+
datasetName: 18_1_missing_in_source
|
517
|
+
fields:
|
518
|
+
- name: target_table
|
519
|
+
expression: '`target_table`'
|
520
|
+
- name: hourly(start_ts)
|
521
|
+
expression: 'DATE_TRUNC("HOUR", `start_ts`)'
|
522
|
+
- name: missing_in_source
|
523
|
+
expression: '`missing_in_source`'
|
524
|
+
disaggregated: true
|
525
|
+
spec:
|
526
|
+
version: 3
|
527
|
+
widgetType: area
|
528
|
+
encodings:
|
529
|
+
x:
|
530
|
+
fieldName: hourly(start_ts)
|
531
|
+
scale:
|
532
|
+
type: temporal
|
533
|
+
displayName: start_ts
|
534
|
+
'y':
|
535
|
+
fieldName: missing_in_source
|
536
|
+
scale:
|
537
|
+
type: quantitative
|
538
|
+
displayName: missing_in_source
|
539
|
+
color:
|
540
|
+
fieldName: target_table
|
541
|
+
scale:
|
542
|
+
type: categorical
|
543
|
+
displayName: target_table
|
544
|
+
label:
|
545
|
+
show: false
|
File without changes
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
CREATE TABLE IF NOT EXISTS aggregate_metrics (
|
2
|
+
recon_table_id BIGINT NOT NULL,
|
3
|
+
rule_id BIGINT NOT NULL,
|
4
|
+
recon_metrics STRUCT<
|
5
|
+
missing_in_source: INTEGER,
|
6
|
+
missing_in_target: INTEGER,
|
7
|
+
mismatch: INTEGER
|
8
|
+
>,
|
9
|
+
run_metrics STRUCT<
|
10
|
+
status: BOOLEAN NOT NULL,
|
11
|
+
run_by_user: STRING NOT NULL,
|
12
|
+
exception_message: STRING
|
13
|
+
> NOT NULL,
|
14
|
+
inserted_ts TIMESTAMP NOT NULL
|
15
|
+
);
|
@@ -0,0 +1,24 @@
|
|
1
|
+
CREATE TABLE IF NOT EXISTS main (
|
2
|
+
recon_table_id BIGINT NOT NULL,
|
3
|
+
recon_id STRING NOT NULL,
|
4
|
+
source_type STRING NOT NULL,
|
5
|
+
source_table STRUCT<
|
6
|
+
catalog: STRING,
|
7
|
+
schema: STRING NOT NULL,
|
8
|
+
table_name: STRING NOT NULL
|
9
|
+
> ,
|
10
|
+
target_table STRUCT<
|
11
|
+
catalog: STRING NOT NULL,
|
12
|
+
schema: STRING NOT NULL,
|
13
|
+
table_name: STRING NOT NULL
|
14
|
+
> NOT NULL,
|
15
|
+
report_type STRING NOT NULL,
|
16
|
+
operation_name STRING NOT NULL,
|
17
|
+
start_ts TIMESTAMP,
|
18
|
+
end_ts TIMESTAMP
|
19
|
+
)
|
20
|
+
TBLPROPERTIES (
|
21
|
+
'delta.columnMapping.mode' = 'name',
|
22
|
+
'delta.minReaderVersion' = '2',
|
23
|
+
'delta.minWriterVersion' = '5'
|
24
|
+
);
|