|
78 | 78 | "selected": True,
|
79 | 79 | "selected-by-default": True,
|
80 | 80 | "table-key-properties": ["id"],
|
81 |
| - "valid-replication-keys": ["updated_at"], |
82 | 81 | },
|
83 | 82 | },
|
84 | 83 | ],
|
@@ -154,32 +153,6 @@ def test_catalog_replication_key(tap: Tap):
|
154 | 153 | )
|
155 | 154 |
|
156 | 155 |
|
157 |
| -def test_catalog_valid_replication_keys(tap: Tap): |
158 |
| - """ |
159 |
| - If we have an incremental stream, the catalog should have a metadata breadcrumb for the incremental |
160 |
| - stream containing the key: `valid-replication-keys`. |
161 |
| -
|
162 |
| - This key should be associated with a list containing the fields that could be used as replication keys. |
163 |
| - For example, the metadata breadcrumb of the stream should look as follows if `updated_at` is its replication_key. |
164 |
| -
|
165 |
| - "metadata": { |
166 |
| - "inclusion": "available", |
167 |
| - "selected": True, |
168 |
| - "selected-by-default": True, |
169 |
| - "table-key-properties": ["id"], |
170 |
| - "valid-replication-keys": ["updated_at"], |
171 |
| - } |
172 |
| - """ |
173 |
| - catalog_dict = tap.catalog.dict(by_alias=True) |
174 |
| - |
175 |
| - replication_keys = catalog_dict["streams"][1]["metadata"][-1]["metadata"].get( |
176 |
| - "valid-replication-keys", None |
177 |
| - ) |
178 |
| - |
179 |
| - # Checks that value of `valid-replication-keys` equals to the replication-key |
180 |
| - assert replication_keys == [DEFAULT_CATALOG["streams"][1]["replication_key"]] |
181 |
| - |
182 |
| - |
183 | 156 | def test_catalog_set_stream_replication_key(tap: Tap):
|
184 | 157 | """If we define a replication key, the catalog should be updated."""
|
185 | 158 | catalog = tap.catalog
|
|
0 commit comments