Skip to content

Commit

Permalink
Add replication key to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Aug 28, 2023
1 parent fc0bd07 commit 94fa72b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ def test_incremental():
Column("name", String),
Column("updated_at", DateTime),
)
replication_key = "updated_at"

with engine.connect() as conn:
if table.exists(conn):
table.drop(conn)
Expand Down Expand Up @@ -380,6 +382,7 @@ def test_incremental():
metadata["metadata"]["selected"] = True
if metadata["breadcrumb"] == []:
metadata["metadata"]["replication-method"] = "INCREMENTAL"
metadata["metadata"]["replication-key"] = replication_key

test_runner = PostgresTestRunner(
tap_class=TapPostgres,
Expand All @@ -392,7 +395,7 @@ def test_incremental():
"value": {
"bookmarks": {
altered_table_name: {
"replication_key": "updated_at",
"replication_key": replication_key,
"replication_key_value": "2022-10-01T00:00:00+00:00",
},
},
Expand Down

0 comments on commit 94fa72b

Please sign in to comment.