Skip to content

Commit cef7cee

Browse files
Add replication key to metadata
1 parent 886964a commit cef7cee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ def test_incremental():
424424
Column("name", String),
425425
Column("updated_at", DateTime),
426426
)
427+
replication_key = "updated_at"
428+
427429
with engine.connect() as conn:
428430
if table.exists(conn):
429431
table.drop(conn)
@@ -477,6 +479,7 @@ def test_incremental():
477479
metadata["metadata"]["selected"] = True
478480
if metadata["breadcrumb"] == []:
479481
metadata["metadata"]["replication-method"] = "INCREMENTAL"
482+
metadata["metadata"]["replication-key"] = replication_key
480483

481484
test_runner = PostgresTestRunner(
482485
tap_class=TapPostgres,
@@ -489,7 +492,7 @@ def test_incremental():
489492
"value": {
490493
"bookmarks": {
491494
altered_table_name: {
492-
"replication_key": "updated_at",
495+
"replication_key": replication_key,
493496
"replication_key_value": "2022-10-01T00:00:00+00:00",
494497
},
495498
},

0 commit comments

Comments
 (0)