Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def text_replace(input: str) -> str:
invalidate_sql_2 = """
-- invalidate records 11 - 21
update {schema}.snapshot_expected set
test_valid_to = updated_at + interval '1 hour'
TEST_VALID_TO = updated_at + interval '1 hour'
where id >= 10 and id <= 20;
"""

Expand All @@ -75,7 +75,7 @@ def text_replace(input: str) -> str:
invalidate_multi_key_sql_2 = """
-- invalidate records 11 - 21
update {schema}.snapshot_expected set
test_valid_to = updated_at + interval '1 hour'
TEST_VALID_TO = updated_at + interval '1 hour'
where id1 >= 10 and id1 <= 20;
"""

Expand Down Expand Up @@ -129,7 +129,7 @@ def project_config_update(self):
"snapshots": {
"test": {
"+snapshot_meta_column_names": {
"dbt_valid_to": "test_valid_to",
"dbt_valid_to": "TEST_VALID_TO",
"dbt_valid_from": "test_valid_from",
"dbt_scd_id": "test_scd_id",
"dbt_updated_at": "test_updated_at",
Expand Down Expand Up @@ -175,7 +175,7 @@ def project_config_update(self):
"snapshots": {
"test": {
"+snapshot_meta_column_names": {
"dbt_valid_to": "test_valid_to",
"dbt_valid_to": "TEST_VALID_TO",
"dbt_valid_from": "test_valid_from",
"dbt_scd_id": "test_scd_id",
"dbt_updated_at": "test_updated_at",
Expand All @@ -195,7 +195,7 @@ def test_snapshot_invalid_column_names(self, project):
manifest = get_manifest(project.project_root)
snapshot_node = manifest.nodes["snapshot.test.snapshot_actual"]
snapshot_node.config.snapshot_meta_column_names == {
"dbt_valid_to": "test_valid_to",
"dbt_valid_to": "TEST_VALID_TO",
"dbt_valid_from": "test_valid_from",
"dbt_scd_id": "test_scd_id",
"dbt_updated_at": "test_updated_at",
Expand All @@ -210,7 +210,7 @@ def test_snapshot_invalid_column_names(self, project):
"snapshots": {
"test": {
"+snapshot_meta_column_names": {
"dbt_valid_to": "test_valid_to",
"dbt_valid_to": "TEST_VALID_TO",
"dbt_updated_at": "test_updated_at",
}
}
Expand Down Expand Up @@ -247,7 +247,7 @@ def test_valid_to_current(self, project):

original_snapshot: Table = run_sql_with_adapter(
project.adapter,
"select id, test_scd_id, test_valid_to from {schema}.snapshot_actual",
"select id, test_scd_id, TEST_VALID_TO from {schema}.snapshot_actual",
"all",
)
assert original_snapshot[0][2] == datetime.datetime(
Expand All @@ -269,7 +269,7 @@ def test_valid_to_current(self, project):

updated_snapshot: Table = run_sql_with_adapter(
project.adapter,
"select id, test_scd_id, test_valid_to from {schema}.snapshot_actual",
"select id, test_scd_id, TEST_VALID_TO from {schema}.snapshot_actual",
"all",
)
print(updated_snapshot)
Expand Down
Loading