-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tables
- Loading branch information
rajeshchellaswamy
committed
Aug 7, 2024
1 parent
b3f14e9
commit 248347a
Showing
1 changed file
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,92 @@ | ||
-- Databricks notebook source | ||
-- MAGIC %md | ||
-- MAGIC schema and tables for Dataquality great expectations | ||
|
||
-- COMMAND ---------- | ||
|
||
create schema if not exists ${catalog}.dataquality | ||
|
||
-- COMMAND ---------- | ||
|
||
CREATE TABLE IF NOT EXISTS ${catalog}.dataquality.regel ( | ||
`regelId` STRING, | ||
`bronTabelId` STRING, | ||
`bronAttribuutId` STRING) | ||
USING delta | ||
COMMENT 'Created by the file upload UI' | ||
TBLPROPERTIES ( | ||
'delta.columnMapping.mode' = 'name', | ||
'delta.enableDeletionVectors' = 'true', | ||
'delta.feature.columnMapping' = 'supported', | ||
'delta.feature.deletionVectors' = 'supported', | ||
'delta.minReaderVersion' = '3', | ||
'delta.minWriterVersion' = '7') | ||
|
||
-- COMMAND ---------- | ||
|
||
CREATE TABLE IF NOT EXISTS ${catalog}.dataquality.bronattribuut ( | ||
name STRING, | ||
`bronAttribuutId` STRING, | ||
`bronTabelId` STRING, | ||
`attribuutNaam` STRING) | ||
USING delta | ||
COMMENT 'Created by the file upload UI' | ||
TBLPROPERTIES ( | ||
'delta.columnMapping.mode' = 'name', | ||
'delta.enableDeletionVectors' = 'true', | ||
'delta.feature.columnMapping' = 'supported', | ||
'delta.feature.deletionVectors' = 'supported', | ||
'delta.minReaderVersion' = '3', | ||
'delta.minWriterVersion' = '7') | ||
|
||
-- COMMAND ---------- | ||
|
||
CREATE TABLE IF NOT EXISTS ${catalog}.dataquality.validatie ( | ||
regelId STRING, | ||
aantalValideRecords BIGINT, | ||
aantalReferentieRecords BIGINT, | ||
dqDatum TIMESTAMP, | ||
dqResultaat STRING) | ||
USING delta | ||
COMMENT 'Created by the file upload UI' | ||
TBLPROPERTIES ( | ||
'delta.checkpoint.writeStatsAsJson' = 'false', | ||
'delta.checkpoint.writeStatsAsStruct' = 'true', | ||
'delta.enableDeletionVectors' = 'true', | ||
'delta.feature.deletionVectors' = 'supported', | ||
'delta.minReaderVersion' = '3', | ||
'delta.minWriterVersion' = '7') | ||
|
||
|
||
-- COMMAND ---------- | ||
|
||
CREATE TABLE IF NOT EXISTS ${catalog}.dataquality.afwijking ( | ||
regelId STRING, | ||
identifierVeldWaarde STRING, | ||
afwijkendeAttribuutWaarde STRING, | ||
dqDatum TIMESTAMP) | ||
USING delta | ||
COMMENT 'Created by the file upload UI' | ||
TBLPROPERTIES ( | ||
'delta.checkpoint.writeStatsAsJson' = 'false', | ||
'delta.checkpoint.writeStatsAsStruct' = 'true', | ||
'delta.enableDeletionVectors' = 'true', | ||
'delta.feature.deletionVectors' = 'supported', | ||
'delta.minReaderVersion' = '3', | ||
'delta.minWriterVersion' = '7') | ||
|
||
-- COMMAND ---------- | ||
|
||
CREATE TABLE IF NOT EXISTS ${catalog}.dataquality.brontabel ( | ||
bronTabelId STRING, | ||
uniekeSleutel STRING) | ||
USING delta | ||
TBLPROPERTIES ( | ||
'delta.minReaderVersion' = '1', | ||
'delta.minWriterVersion' = '2') | ||
|
||
-- COMMAND ---------- | ||
|
||
-- MAGIC %environment | ||
-- MAGIC "client": "1" | ||
-- MAGIC "base_environment": "" |