From b39feb91a10618916c7cf45b1f11410e02b651d9 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 11:36:57 +0200 Subject: [PATCH 01/45] Add checks in CICD --- .github/workflows/dataform-compile.yaml | 15 +++++++++++++++ includes/data_completeness_assertions.js | 2 +- includes/data_freshness_assertions.js | 6 +++--- 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/dataform-compile.yaml diff --git a/.github/workflows/dataform-compile.yaml b/.github/workflows/dataform-compile.yaml new file mode 100644 index 0000000..ea72d20 --- /dev/null +++ b/.github/workflows/dataform-compile.yaml @@ -0,0 +1,15 @@ +name: Dataform compilation check +on: + pull_request: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + - run: npm i -g @dataform/cli@^2.9.0 + - run: dataform compile diff --git a/includes/data_completeness_assertions.js b/includes/data_completeness_assertions.js index dd0b130..355eb47 100644 --- a/includes/data_completeness_assertions.js +++ b/includes/data_completeness_assertions.js @@ -37,7 +37,7 @@ const createDataCompletenessAssertion = (globalParams, filter, tableName, column ${ctx.ref(tableName)} WHERE ${filter} - ) + ) SELECT COUNT(*) AS total_rows, SUM(CASE WHEN ${columnName} IS NULL THEN 1 ELSE 0 END) AS null_count FROM filtering diff --git a/includes/data_freshness_assertions.js b/includes/data_freshness_assertions.js index 39e3e0a..2b38326 100644 --- a/includes/data_freshness_assertions.js +++ b/includes/data_freshness_assertions.js @@ -20,7 +20,7 @@ const assertions = []; const createDataFreshnessAssertion = (globalParams, filter, tableName, delayCondition, timeUnit, dateColumn, timeZone = "UTC") => { - + const assertion = assert(`assert_freshness_${tableName}`) .database(globalParams.database) .schema(globalParams.schema) @@ -35,8 +35,8 @@ const createDataFreshnessAssertion = (globalParams, filter, tableName, delayCond ${ctx.ref(tableName)} WHERE ${filter} - ), - + ), + freshness AS ( SELECT ${["DAY", "WEEK", "MONTH", "QUARTER", "YEAR"].includes(timeUnit) From c03440cb76ee419c68158626ec80d80e3c542037 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 11:40:51 +0200 Subject: [PATCH 02/45] Fix --- .github/workflows/dataform-compile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dataform-compile.yaml b/.github/workflows/dataform-compile.yaml index ea72d20..52ba0e4 100644 --- a/.github/workflows/dataform-compile.yaml +++ b/.github/workflows/dataform-compile.yaml @@ -11,5 +11,5 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20.x' - - run: npm i -g @dataform/cli@^2.9.0 + - run: npm i -g @dataform/cli@latest - run: dataform compile From 35d0bf3b4f01290d5ef5a4f64fc3c34d18b7aecc Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 11:42:02 +0200 Subject: [PATCH 03/45] Fix --- .github/workflows/dataform-compile.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/dataform-compile.yaml b/.github/workflows/dataform-compile.yaml index 52ba0e4..4971631 100644 --- a/.github/workflows/dataform-compile.yaml +++ b/.github/workflows/dataform-compile.yaml @@ -11,5 +11,4 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20.x' - - run: npm i -g @dataform/cli@latest - - run: dataform compile + - run: npm i -g @dataform/cli@latest && dataform compile From 3ff5e623f53a52af486ea7f2cb02e30c2742058e Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 11:45:00 +0200 Subject: [PATCH 04/45] Fix --- .github/workflows/dataform-compile.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dataform-compile.yaml b/.github/workflows/dataform-compile.yaml index 4971631..6f88cc1 100644 --- a/.github/workflows/dataform-compile.yaml +++ b/.github/workflows/dataform-compile.yaml @@ -11,4 +11,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20.x' - - run: npm i -g @dataform/cli@latest && dataform compile + - run: npm i -g @dataform/cli@latest + - run: dataform install + - run: dataform compile From 84ee0c1143ba7f652b0d190c7add0e461a0d4e60 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 11:46:12 +0200 Subject: [PATCH 05/45] Fix --- .github/workflows/dataform-compile.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dataform-compile.yaml b/.github/workflows/dataform-compile.yaml index 6f88cc1..6d3a7b2 100644 --- a/.github/workflows/dataform-compile.yaml +++ b/.github/workflows/dataform-compile.yaml @@ -4,7 +4,7 @@ on: branches: - main jobs: - build: + compile-dataform: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -14,3 +14,4 @@ jobs: - run: npm i -g @dataform/cli@latest - run: dataform install - run: dataform compile + - run: dataform test From c341923380a87b379b8a881fd56a532f7b8d708b Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 11:47:06 +0200 Subject: [PATCH 06/45] Fix --- .../{dataform-compile.yaml => dataform-compilation-check.yaml} | 1 - 1 file changed, 1 deletion(-) rename .github/workflows/{dataform-compile.yaml => dataform-compilation-check.yaml} (93%) diff --git a/.github/workflows/dataform-compile.yaml b/.github/workflows/dataform-compilation-check.yaml similarity index 93% rename from .github/workflows/dataform-compile.yaml rename to .github/workflows/dataform-compilation-check.yaml index 6d3a7b2..1de6c60 100644 --- a/.github/workflows/dataform-compile.yaml +++ b/.github/workflows/dataform-compilation-check.yaml @@ -14,4 +14,3 @@ jobs: - run: npm i -g @dataform/cli@latest - run: dataform install - run: dataform compile - - run: dataform test From ddfde999113413867ff24c63555efd352f2b3815 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 11:54:48 +0200 Subject: [PATCH 07/45] Fix --- .pre-commit-config.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c85c8ae..54e766b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,14 @@ +ci: + autofix_commit_msg: | + [pre-commit.ci] auto fixes from pre-commit.com hooks + + for more information, see https://pre-commit.ci + autofix_prs: true + autoupdate_branch: '' + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' + autoupdate_schedule: weekly + skip: [] + submodules: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 From 8f4219667ca7e246750c607daf1295364adafe98 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 14:23:49 +0200 Subject: [PATCH 08/45] Fix --- .pre-commit-config.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54e766b..c4b7889 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,6 @@ ci: - autofix_commit_msg: | - [pre-commit.ci] auto fixes from pre-commit.com hooks - - for more information, see https://pre-commit.ci autofix_prs: true - autoupdate_branch: '' - autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' - autoupdate_schedule: weekly - skip: [] - submodules: false + skip: [dataform_format] repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 From 72ba857ff5bc697bb8b7e739f4a351c1eb56a220 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 14:27:51 +0200 Subject: [PATCH 09/45] _ --- .github/workflows/dataform-compilation-check.yaml | 1 + definitions/first_table.sqlx | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataform-compilation-check.yaml b/.github/workflows/dataform-compilation-check.yaml index 1de6c60..c0869e5 100644 --- a/.github/workflows/dataform-compilation-check.yaml +++ b/.github/workflows/dataform-compilation-check.yaml @@ -14,3 +14,4 @@ jobs: - run: npm i -g @dataform/cli@latest - run: dataform install - run: dataform compile + - run: dataform format diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 295a510..4c01c21 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -7,8 +7,7 @@ SELECT CURRENT_DATE() AS updated_date UNION ALL SELECT - 1 AS id, - CURRENT_DATE() AS updated_date + 1 AS id,CURRENT_DATE() AS updated_date UNION ALL SELECT 2 AS id, From 66d90dfbe9731935578d3dcd238057c5feec2aeb Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 14:30:34 +0200 Subject: [PATCH 10/45] Fix --- .github/workflows/dataform-compilation-check.yaml | 1 - .pre-commit-config.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/dataform-compilation-check.yaml b/.github/workflows/dataform-compilation-check.yaml index c0869e5..1de6c60 100644 --- a/.github/workflows/dataform-compilation-check.yaml +++ b/.github/workflows/dataform-compilation-check.yaml @@ -14,4 +14,3 @@ jobs: - run: npm i -g @dataform/cli@latest - run: dataform install - run: dataform compile - - run: dataform format diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4b7889..3fd0185 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,5 @@ ci: autofix_prs: true - skip: [dataform_format] repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 From ea3a477542023d4ac989a36f9db9540359a7f158 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 14:48:35 +0200 Subject: [PATCH 11/45] Fix --- .pre-commit-config.yaml | 2 +- definitions/first_table.sqlx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3fd0185..715310c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,6 @@ repos: - id: no-commit-to-branch args: [--branch, main] - repo: https://github.com/devoteamgcloud/pre-commit-dataform - rev: v1.0.2 + rev: v1.0.3beta hooks: - id: dataform_format diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 4c01c21..295a510 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -7,7 +7,8 @@ SELECT CURRENT_DATE() AS updated_date UNION ALL SELECT - 1 AS id,CURRENT_DATE() AS updated_date + 1 AS id, + CURRENT_DATE() AS updated_date UNION ALL SELECT 2 AS id, From 1df02c8c58ca5894ddd0f9827cd24c8e460ebfbd Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 14:49:39 +0200 Subject: [PATCH 12/45] test --- definitions/first_table.sqlx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 295a510..5ea4528 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -7,8 +7,7 @@ SELECT CURRENT_DATE() AS updated_date UNION ALL SELECT - 1 AS id, - CURRENT_DATE() AS updated_date + 1 AS id, CURRENT_DATE() AS updated_date UNION ALL SELECT 2 AS id, From 05d6c49bec857d3655f57a7a04a003b82de6662d Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 14:53:40 +0200 Subject: [PATCH 13/45] test --- definitions/second_table.sqlx | 3 +-- package-lock.json | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/definitions/second_table.sqlx b/definitions/second_table.sqlx index 382c822..0bee743 100644 --- a/definitions/second_table.sqlx +++ b/definitions/second_table.sqlx @@ -7,8 +7,7 @@ SELECT DATE(1970, 1, 1) AS updated_date UNION ALL SELECT - 2 AS id, - DATE(1970, 1, 1) AS updated_date + 2 AS id,DATE(1970, 1, 1) AS updated_date UNION ALL SELECT NULL AS id, diff --git a/package-lock.json b/package-lock.json index 793decc..38440a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devoteamgcloud/dataform-assertions", - "version": "1.1.0", + "version": "1.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devoteamgcloud/dataform-assertions", - "version": "1.1.0", + "version": "1.2.2", "dependencies": { "@dataform/core": "2.9.0" } From 6d906ffcf05ccdb665a5fad47b801e45c7216047 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:08:20 +0200 Subject: [PATCH 14/45] test --- .pre-commit-config.yaml | 2 +- definitions/first_table.sqlx | 3 +-- definitions/second_table.sqlx | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 715310c..3ad2798 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,6 @@ repos: - id: no-commit-to-branch args: [--branch, main] - repo: https://github.com/devoteamgcloud/pre-commit-dataform - rev: v1.0.3beta + rev: v1.0.5 hooks: - id: dataform_format diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 5ea4528..7374e49 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -6,8 +6,7 @@ SELECT 1 AS id, CURRENT_DATE() AS updated_date UNION ALL -SELECT - 1 AS id, CURRENT_DATE() AS updated_date +SELECT 1 AS id, CURRENT_DATE() AS updated_date UNION ALL SELECT 2 AS id, diff --git a/definitions/second_table.sqlx b/definitions/second_table.sqlx index 0bee743..382c822 100644 --- a/definitions/second_table.sqlx +++ b/definitions/second_table.sqlx @@ -7,7 +7,8 @@ SELECT DATE(1970, 1, 1) AS updated_date UNION ALL SELECT - 2 AS id,DATE(1970, 1, 1) AS updated_date + 2 AS id, + DATE(1970, 1, 1) AS updated_date UNION ALL SELECT NULL AS id, From f34325a7fa90a569a5f364d54f9acf6c4ac551aa Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:13:50 +0200 Subject: [PATCH 15/45] test --- .pre-commit-config.yaml | 2 +- definitions/first_table.sqlx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3ad2798..a419596 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ ci: - autofix_prs: true + autofix_prs: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 7374e49..9f4f7dc 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -10,4 +10,4 @@ SELECT 1 AS id, CURRENT_DATE() AS updated_date UNION ALL SELECT 2 AS id, - CURRENT_DATE() AS updated_date + CURRENT_DATE() AS updated_date \ No newline at end of file From 24b8b53f31033e654f8fede1dbae500f20d19dc6 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:36:31 +0200 Subject: [PATCH 16/45] test --- ...aform-compilation-check.yaml => pre-commit-check.yaml} | 6 +++--- .pre-commit-config.yaml | 2 -- definitions/first_table.sqlx | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) rename .github/workflows/{dataform-compilation-check.yaml => pre-commit-check.yaml} (76%) diff --git a/.github/workflows/dataform-compilation-check.yaml b/.github/workflows/pre-commit-check.yaml similarity index 76% rename from .github/workflows/dataform-compilation-check.yaml rename to .github/workflows/pre-commit-check.yaml index 1de6c60..a802d53 100644 --- a/.github/workflows/dataform-compilation-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -4,7 +4,7 @@ on: branches: - main jobs: - compile-dataform: + pre-commit-check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -12,5 +12,5 @@ jobs: with: node-version: '20.x' - run: npm i -g @dataform/cli@latest - - run: dataform install - - run: dataform compile + - uses: pre-commit-ci/lite-action@v1.0.2 + if: always() diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a419596..40f898c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,3 @@ -ci: - autofix_prs: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 9f4f7dc..b171639 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -6,8 +6,8 @@ SELECT 1 AS id, CURRENT_DATE() AS updated_date UNION ALL -SELECT 1 AS id, CURRENT_DATE() AS updated_date -UNION ALL SELECT - 2 AS id, - CURRENT_DATE() AS updated_date \ No newline at end of file + 1 AS id, + CURRENT_DATE() AS updated_date +UNION ALL +SELECT 2 AS id,CURRENT_DATE() AS updated_date \ No newline at end of file From 4b5202e129f67a99043eb4dcb8dd33fd552fa6f3 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:39:07 +0200 Subject: [PATCH 17/45] test --- .github/workflows/pre-commit-check.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index a802d53..2098d5a 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -12,5 +12,4 @@ jobs: with: node-version: '20.x' - run: npm i -g @dataform/cli@latest - - uses: pre-commit-ci/lite-action@v1.0.2 - if: always() + - uses: pre-commit/action@v3.0.1 \ No newline at end of file From 3e178a86eb3644353f5dc4568e682bc4eefd8670 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:40:37 +0200 Subject: [PATCH 18/45] test --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40f898c..c85c8ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,6 @@ repos: - id: no-commit-to-branch args: [--branch, main] - repo: https://github.com/devoteamgcloud/pre-commit-dataform - rev: v1.0.5 + rev: v1.0.2 hooks: - id: dataform_format From fabfde4d4d665cb814f9740d1772968179301f4e Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:42:02 +0200 Subject: [PATCH 19/45] test --- .github/workflows/pre-commit-check.yaml | 2 +- definitions/first_table.sqlx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 2098d5a..c6da7c3 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -1,4 +1,4 @@ -name: Dataform compilation check +name: Pre-commit check on: pull_request: branches: diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index b171639..160da5b 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -10,4 +10,4 @@ SELECT 1 AS id, CURRENT_DATE() AS updated_date UNION ALL -SELECT 2 AS id,CURRENT_DATE() AS updated_date \ No newline at end of file +SELECT 2 AS id,CURRENT_DATE() AS updated_date From c1f9774ca51d9973d3c7945a2b5d5ceebef821c6 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:42:40 +0200 Subject: [PATCH 20/45] test --- .github/workflows/pre-commit-check.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index c6da7c3..0de664a 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -12,4 +12,5 @@ jobs: with: node-version: '20.x' - run: npm i -g @dataform/cli@latest - - uses: pre-commit/action@v3.0.1 \ No newline at end of file + - uses: pre-commit/action@v3.0.1 + \ No newline at end of file From 0b8c037671645e892c7fa5c5d268ed3aa6137601 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:43:48 +0200 Subject: [PATCH 21/45] test --- .github/workflows/pre-commit-check.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 0de664a..1277eae 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -11,6 +11,4 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20.x' - - run: npm i -g @dataform/cli@latest - uses: pre-commit/action@v3.0.1 - \ No newline at end of file From e13237ecf37c763a5ef65ac8ea1344809af33f12 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:45:02 +0200 Subject: [PATCH 22/45] test --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c85c8ae..40f898c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,6 @@ repos: - id: no-commit-to-branch args: [--branch, main] - repo: https://github.com/devoteamgcloud/pre-commit-dataform - rev: v1.0.2 + rev: v1.0.5 hooks: - id: dataform_format From 36f525b0c451878fbf25381b6e982ec4896897fd Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 15:46:25 +0200 Subject: [PATCH 23/45] format code --- definitions/first_table.sqlx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 160da5b..295a510 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -10,4 +10,6 @@ SELECT 1 AS id, CURRENT_DATE() AS updated_date UNION ALL -SELECT 2 AS id,CURRENT_DATE() AS updated_date +SELECT + 2 AS id, + CURRENT_DATE() AS updated_date From 286bd0f6dafaa73a5a503567e506bbb1a93fee99 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:04:16 +0200 Subject: [PATCH 24/45] Add precommit ci --- .github/workflows/pre-commit-check.yaml | 14 -------------- .pre-commit-config.yaml | 3 ++- test.sh | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 15 deletions(-) delete mode 100644 .github/workflows/pre-commit-check.yaml create mode 100755 test.sh diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml deleted file mode 100644 index 1277eae..0000000 --- a/.github/workflows/pre-commit-check.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: Pre-commit check -on: - pull_request: - branches: - - main -jobs: - pre-commit-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40f898c..e84ebcf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,7 @@ repos: - id: no-commit-to-branch args: [--branch, main] - repo: https://github.com/devoteamgcloud/pre-commit-dataform - rev: v1.0.5 + rev: v1.1.1 hooks: - id: dataform_format + - id: dataform_compile diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..bdcc613 --- /dev/null +++ b/test.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Idea is to get md5 hash of all files in the current directory then dataform format and again do the hash +# if hash changes then we know that the file has been modified by the format commant + +# Get the md5 hash of all files in the current directory and put in a variable +hash1=$(find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}') + +# Format all files in the current directory +dataform format + +# Get the md5 hash of all files in the current directory and put in a variable +hash2=$(find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}') + +# Compare the two hashes +if [ "$hash1" != "$hash2" ]; then + echo "Files have been modified" +else + echo "Files have not been modified" +fi From c0f96414c542968a7a8bff5e23d0e50b7e394cb8 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:08:46 +0200 Subject: [PATCH 25/45] Add precommit ci --- .github/workflows/pre-commit-check.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/pre-commit-check.yaml diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml new file mode 100644 index 0000000..1277eae --- /dev/null +++ b/.github/workflows/pre-commit-check.yaml @@ -0,0 +1,14 @@ +name: Pre-commit check +on: + pull_request: + branches: + - main +jobs: + pre-commit-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + - uses: pre-commit/action@v3.0.1 From 62b546de5732cfcd5d155ea512b3b996f0ae976f Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:10:20 +0200 Subject: [PATCH 26/45] _ --- definitions/example.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/example.js b/definitions/example.js index d6331c2..ece3487 100644 --- a/definitions/example.js +++ b/definitions/example.js @@ -30,7 +30,7 @@ const commonAssertionsResult = commonAssertions({ "second_table": ["id", "updated_date"] }, dataFreshnessConditions: { - "first_table": { + "first_tabl": { "dateColumn": "updated_date", "timeUnit": "DAY", "delayCondition": 1, From 0084ffd6d0c1630b4955c41acc3bec2fc26abd72 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:20:37 +0200 Subject: [PATCH 27/45] _ --- .github/workflows/pre-commit-check.yaml | 1 + test.sh | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100755 test.sh diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 1277eae..6b2f257 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -12,3 +12,4 @@ jobs: with: node-version: '20.x' - uses: pre-commit/action@v3.0.1 + - run: definitions/example.js diff --git a/test.sh b/test.sh deleted file mode 100755 index bdcc613..0000000 --- a/test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# Idea is to get md5 hash of all files in the current directory then dataform format and again do the hash -# if hash changes then we know that the file has been modified by the format commant - -# Get the md5 hash of all files in the current directory and put in a variable -hash1=$(find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}') - -# Format all files in the current directory -dataform format - -# Get the md5 hash of all files in the current directory and put in a variable -hash2=$(find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}') - -# Compare the two hashes -if [ "$hash1" != "$hash2" ]; then - echo "Files have been modified" -else - echo "Files have not been modified" -fi From cd1da772f8381095b4a230958b26adc58ce6b8ae Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:20:48 +0200 Subject: [PATCH 28/45] _ --- .github/workflows/pre-commit-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 6b2f257..f6ab180 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -12,4 +12,4 @@ jobs: with: node-version: '20.x' - uses: pre-commit/action@v3.0.1 - - run: definitions/example.js + - run: cat definitions/example.js From 93cc795936fed3040c06b403d885576f474e5ecc Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:22:06 +0200 Subject: [PATCH 29/45] _ --- .github/workflows/pre-commit-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index f6ab180..8aa9d18 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -12,4 +12,4 @@ jobs: with: node-version: '20.x' - uses: pre-commit/action@v3.0.1 - - run: cat definitions/example.js + - run: pre-commit run --all-files From 691c4a2dec5970ba5332ac2ef32544f2c8ba9e73 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:23:29 +0200 Subject: [PATCH 30/45] _ --- definitions/first_table.sqlx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 295a510..5ea4528 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -7,8 +7,7 @@ SELECT CURRENT_DATE() AS updated_date UNION ALL SELECT - 1 AS id, - CURRENT_DATE() AS updated_date + 1 AS id, CURRENT_DATE() AS updated_date UNION ALL SELECT 2 AS id, From 68cf5ac6f894df208f7b47647ac21e0fc2221ef6 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:25:13 +0200 Subject: [PATCH 31/45] _ --- .github/workflows/pre-commit-check.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 8aa9d18..d6ac0b1 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -11,5 +11,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20.x' - - uses: pre-commit/action@v3.0.1 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - run: pip install pre-commit - run: pre-commit run --all-files From e25a5657957bcc67d454f976f97c722ebb8b99e0 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:26:46 +0200 Subject: [PATCH 32/45] _ --- .github/workflows/pre-commit-check.yaml | 2 +- definitions/first_table.sqlx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index d6ac0b1..8d84d67 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -13,6 +13,6 @@ jobs: node-version: '20.x' - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.10' - run: pip install pre-commit - run: pre-commit run --all-files diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 5ea4528..295a510 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -7,7 +7,8 @@ SELECT CURRENT_DATE() AS updated_date UNION ALL SELECT - 1 AS id, CURRENT_DATE() AS updated_date + 1 AS id, + CURRENT_DATE() AS updated_date UNION ALL SELECT 2 AS id, From b8d0a7cbb3279756a8f396caf964d601cc66f407 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:28:19 +0200 Subject: [PATCH 33/45] _ --- .github/workflows/pre-commit-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 8d84d67..0b1a5a1 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -16,3 +16,4 @@ jobs: python-version: '3.10' - run: pip install pre-commit - run: pre-commit run --all-files + - run: dataform compile From 20babed8994b85c11d58abfdcc7c3f8a431226a3 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:30:20 +0200 Subject: [PATCH 34/45] _ --- .github/workflows/pre-commit-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 0b1a5a1..52904e2 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -16,4 +16,4 @@ jobs: python-version: '3.10' - run: pip install pre-commit - run: pre-commit run --all-files - - run: dataform compile + - run: npm i -g @dataform/cli@latest && dataform compile From 19c3a5b107c6b884669c8dfed20b1b576751586b Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:35:43 +0200 Subject: [PATCH 35/45] test --- .github/workflows/pre-commit-check.yaml | 1 - .pre-commit-config.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 52904e2..8d84d67 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -16,4 +16,3 @@ jobs: python-version: '3.10' - run: pip install pre-commit - run: pre-commit run --all-files - - run: npm i -g @dataform/cli@latest && dataform compile diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e84ebcf..0a2cd39 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: no-commit-to-branch args: [--branch, main] - repo: https://github.com/devoteamgcloud/pre-commit-dataform - rev: v1.1.1 + rev: v1.1.2 hooks: - id: dataform_format - id: dataform_compile From dda885219ad022890a1feadc9a1483093f0782c2 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:37:55 +0200 Subject: [PATCH 36/45] test --- .github/workflows/pre-commit-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 8d84d67..ef988c9 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -16,3 +16,4 @@ jobs: python-version: '3.10' - run: pip install pre-commit - run: pre-commit run --all-files + - run: npm i -g @dataform/cli@latest && dataform install && dataform compile From 9ffbdc63feaeca5c14d58d61029287b51316a6a3 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:42:02 +0200 Subject: [PATCH 37/45] test --- .github/workflows/pre-commit-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index ef988c9..0925b0f 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -15,5 +15,5 @@ jobs: with: python-version: '3.10' - run: pip install pre-commit - - run: pre-commit run --all-files + - run: pre-commit run --all-files --verbose - run: npm i -g @dataform/cli@latest && dataform install && dataform compile From b1d58c41adc5907b9986cef314a0657d9cf843f5 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:46:45 +0200 Subject: [PATCH 38/45] test checks --- .github/workflows/pre-commit-check.yaml | 1 - definitions/example.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 0925b0f..e4a15cb 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -16,4 +16,3 @@ jobs: python-version: '3.10' - run: pip install pre-commit - run: pre-commit run --all-files --verbose - - run: npm i -g @dataform/cli@latest && dataform install && dataform compile diff --git a/definitions/example.js b/definitions/example.js index ece3487..d6331c2 100644 --- a/definitions/example.js +++ b/definitions/example.js @@ -30,7 +30,7 @@ const commonAssertionsResult = commonAssertions({ "second_table": ["id", "updated_date"] }, dataFreshnessConditions: { - "first_tabl": { + "first_table": { "dateColumn": "updated_date", "timeUnit": "DAY", "delayCondition": 1, From 4dd7628567ba6d2cfb4a6ea9af5a165b4576a000 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:53:43 +0200 Subject: [PATCH 39/45] test --- .pre-commit-config.yaml | 2 +- definitions/example.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0a2cd39..80076b6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: no-commit-to-branch args: [--branch, main] - repo: https://github.com/devoteamgcloud/pre-commit-dataform - rev: v1.1.2 + rev: v1.1.3 hooks: - id: dataform_format - id: dataform_compile diff --git a/definitions/example.js b/definitions/example.js index d6331c2..46a1e65 100644 --- a/definitions/example.js +++ b/definitions/example.js @@ -26,7 +26,7 @@ const commonAssertionsResult = commonAssertions({ } }, uniqueKeyConditions: { - "first_table": ["id"], + "first_tabl": ["id"], "second_table": ["id", "updated_date"] }, dataFreshnessConditions: { From e581efe104993b9b9f3fed8824d36c6fe0df0911 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:56:18 +0200 Subject: [PATCH 40/45] test --- .github/workflows/pre-commit-check.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index e4a15cb..40a696e 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -11,8 +11,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20.x' - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - run: pip install pre-commit - - run: pre-commit run --all-files --verbose + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.1 + From af3aaf68d3997c26e0b7bd4d41aa7b3cc7959173 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:58:07 +0200 Subject: [PATCH 41/45] test --- .github/workflows/pre-commit-check.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 40a696e..8d84d67 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -11,6 +11,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20.x' - - uses: actions/setup-python@v3 - - uses: pre-commit/action@v3.0.1 - + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - run: pip install pre-commit + - run: pre-commit run --all-files From a8244e1069b4a54a18d10f012b4cf8aea8c4802c Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 17:59:20 +0200 Subject: [PATCH 42/45] test --- definitions/example.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/example.js b/definitions/example.js index 46a1e65..d6331c2 100644 --- a/definitions/example.js +++ b/definitions/example.js @@ -26,7 +26,7 @@ const commonAssertionsResult = commonAssertions({ } }, uniqueKeyConditions: { - "first_tabl": ["id"], + "first_table": ["id"], "second_table": ["id", "updated_date"] }, dataFreshnessConditions: { From ef351f536fad84ebc1d059bc593d5cb1782e8fd2 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 18:00:20 +0200 Subject: [PATCH 43/45] test --- definitions/first_table.sqlx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 295a510..5ea4528 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -7,8 +7,7 @@ SELECT CURRENT_DATE() AS updated_date UNION ALL SELECT - 1 AS id, - CURRENT_DATE() AS updated_date + 1 AS id, CURRENT_DATE() AS updated_date UNION ALL SELECT 2 AS id, From dfc42b6e3ce8a59f163006ae09dbb66995d9b92a Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 18:01:45 +0200 Subject: [PATCH 44/45] Release --- definitions/first_table.sqlx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/definitions/first_table.sqlx b/definitions/first_table.sqlx index 5ea4528..295a510 100644 --- a/definitions/first_table.sqlx +++ b/definitions/first_table.sqlx @@ -7,7 +7,8 @@ SELECT CURRENT_DATE() AS updated_date UNION ALL SELECT - 1 AS id, CURRENT_DATE() AS updated_date + 1 AS id, + CURRENT_DATE() AS updated_date UNION ALL SELECT 2 AS id, From b08dab2c51462717d0b9687c4f6ec26e489d5e20 Mon Sep 17 00:00:00 2001 From: Hugo Rialan Date: Thu, 13 Jun 2024 18:03:55 +0200 Subject: [PATCH 45/45] Release --- .github/workflows/pre-commit-check.yaml | 2 +- includes/data_freshness_assertions.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml index 8d84d67..16020ba 100644 --- a/.github/workflows/pre-commit-check.yaml +++ b/.github/workflows/pre-commit-check.yaml @@ -1,4 +1,4 @@ -name: Pre-commit check +name: pre-commit check on: pull_request: branches: diff --git a/includes/data_freshness_assertions.js b/includes/data_freshness_assertions.js index 2b38326..c61f047 100644 --- a/includes/data_freshness_assertions.js +++ b/includes/data_freshness_assertions.js @@ -36,7 +36,6 @@ const createDataFreshnessAssertion = (globalParams, filter, tableName, delayCond WHERE ${filter} ), - freshness AS ( SELECT ${["DAY", "WEEK", "MONTH", "QUARTER", "YEAR"].includes(timeUnit)