Skip to content

26 create additional metadata columns for control snap tables v0 and v1 #419

Merged
tkiehn merged 26 commits intomainfrom
26-re-add-end_of_month-for-control_snap_v0
Apr 2, 2026
Merged

26 create additional metadata columns for control snap tables v0 and v1 #419
tkiehn merged 26 commits intomainfrom
26-re-add-end_of_month-for-control_snap_v0

Conversation

@Tobias-Pah
Copy link
Copy Markdown
Contributor

@Tobias-Pah Tobias-Pah commented Feb 18, 2026

Description

following additional metadata columns in all Control Snap v0 and v1 models were added

  • beginning_of_week (this is arguable, some countries see sunday as first day of week. Pls add new global parameter like 'first_day_of_week' with default value '1' (?) , but make monday the default.)
  • end_of_week (same here)
  • beginning_of_month
  • end_of_month
  • beginning_of_quarter
  • end_of_quarter
  • beginning_of_year
  • end_of_year

in dbt project yml file there is now an additional variable, called datavault4dbt.first_day_of_week, which takes in different values for adapters. For example BigQuery defaults to a 1 = Sunday and 2 = Monday, whereas Databricks defaults to 0 = Sunday and 1 = Monday. The default setting for all adapters is Monday as the start of the week.
The possible values for all adapters are documented in a table in the snapshot v0 docs.

Fixes #(issue)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Ran the snapshot models and tests in automatic tests repo on databricks adapter for both datavault4dbt.first_day_of_week values 1 and 7. Created several new tests such as a golden snapshot table to verify the snapshot logic in general and especially the first_day_of_week logic.

@Tobias-Pah Tobias-Pah added the testing To trigger the automated test workflow as internal User. label Feb 18, 2026
@remoteworkflow

This comment was marked as outdated.

@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Feb 18, 2026
@remoteworkflow

This comment was marked as outdated.

@Tobias-Pah Tobias-Pah added the testing To trigger the automated test workflow as internal User. label Feb 24, 2026
@remoteworkflow

This comment was marked as outdated.

@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Feb 24, 2026
@Tobias-Pah Tobias-Pah added the testing To trigger the automated test workflow as internal User. label Feb 24, 2026
@remoteworkflow

This comment was marked as outdated.

@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Feb 24, 2026
@Tobias-Pah Tobias-Pah added the testing To trigger the automated test workflow as internal User. label Feb 25, 2026
@Tobias-Pah Tobias-Pah requested a review from tkiehn February 25, 2026 09:12
@remoteworkflow

This comment was marked as outdated.

@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Feb 25, 2026
@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Mar 25, 2026
@Tobias-Pah Tobias-Pah added the testing To trigger the automated test workflow as internal User. label Mar 26, 2026
@remoteworkflow

This comment was marked as outdated.

@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Mar 26, 2026
@Tobias-Pah Tobias-Pah added the testing To trigger the automated test workflow as internal User. label Mar 26, 2026
@remoteworkflow

This comment was marked as outdated.

@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Mar 26, 2026
@remoteworkflow

This comment was marked as outdated.

@tkiehn tkiehn added testing To trigger the automated test workflow as internal User. and removed testing To trigger the automated test workflow as internal User. labels Mar 30, 2026
@tkiehn tkiehn added the testing To trigger the automated test workflow as internal User. label Mar 30, 2026
@remoteworkflow

This comment was marked as outdated.

@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Mar 30, 2026
@remoteworkflow

This comment was marked as outdated.

@Tobias-Pah Tobias-Pah added the testing To trigger the automated test workflow as internal User. label Mar 31, 2026
@remoteworkflow

This comment was marked as outdated.

@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Mar 31, 2026
@Tobias-Pah Tobias-Pah added the testing To trigger the automated test workflow as internal User. label Mar 31, 2026
@remoteworkflow
Copy link
Copy Markdown

dbt test combined result: ❌


Details

RESULTS for Synapse:
✅ dbt-core-tests
⚠️ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


RESULTS for Postgres:
✅ dbt-core-tests
⚠️ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


RESULTS for BigQuery:
✅ dbt-core-tests
✅ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


RESULTS for Redshift:
✅ dbt-core-tests
✅ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


RESULTS for Snowflake:
✅ dbt-core-tests
✅ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


RESULTS for Exasol:
❌ dbt-core-tests
⚠️ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


RESULTS for Fabric:
❌ dbt-core-tests
⚠️ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


RESULTS for Oracle:
✅ dbt-core-tests
⚠️ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


RESULTS for Databricks:
✅ dbt-core-tests
✅ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


RESULTS for SQL Server:
⚠️ dbt-tests
⚠️ dbt-fusion-tests
⚠️ dbt-macro-tests
⚠️ tech-tests


Link to workflow summary: https://github.com/ScalefreeCOM/datavault4dbt-ci-cd/actions/runs/23790859872

@remoteworkflow remoteworkflow Bot removed the testing To trigger the automated test workflow as internal User. label Mar 31, 2026
@tkiehn tkiehn self-requested a review March 31, 2026 12:59
@tkiehn tkiehn merged commit 94a07ab into main Apr 2, 2026
3 checks passed
@tkiehn tkiehn deleted the 26-re-add-end_of_month-for-control_snap_v0 branch April 7, 2026 09:10
tkiehn added a commit that referenced this pull request Apr 27, 2026
…v1 (#419)

* REDSHIFT.control_snap_v0: added is_eom, is_quarterly, is_eoq, is_eoy

* BIGQUERY.control_snap_v0: added is_eoq

* SNOWFLAKE.control_snap_v0: added is_eom, is_quarterly, is_eoq, is_eoy

* DATABRICKS.control_snap_v0: added is_eoq

* POSTGRES.control_snap_v0: added is_eom, is_quarterly, is_eoq, is_eoy

* ORACLE.control_snap_v0: added is_eom, is_quarterly, is_eoq, is_eoy

* feat: reworked control_snap_v0 functionality

* feat: updated the v1 dependencies

* feat: added documentation for weekly calculations

* feat: removed explicit date columns in v0 and added all boolean flags to v1 snapshot tables

* fix: syntax corrections

* fix: added macro file for correct call and updated adapter calls

* fix: corrected snowflake syntax

* feat: added adapter specific macros to first_day_of_week macro

* fix: fixed macro call

* fix: added else statement to macro block for missing var

* feat: updated snapshot logic for user handling

* fix: fixed bigquery control snap adapter

* fix: fixed some snapshot logic that was wrong in testing

* fix: reworked snapshot logic once more and fixed the adapter tables

* feat: updated docs

---------

Co-authored-by: umattern 
Co-authored-by: Theo Kiehn <162969167+tkiehn@users.noreply.github.com>
Co-authored-by: Tim Kirschke <81677440+tkirschke@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants