有时,我们希望重写流的键属性(主键)或增量复制键。在梅尔塔诺做这件事最好的方法是什么?
发布于 2022-03-29 22:43:43
在Meltano文件中,可以使用key-properties额外配置添加metadata和/或replication-key覆盖。
文档参考:https://docs.meltano.com/concepts/plugins#metadata-extra
示例yaml代码:
extractors:
- name: tap-postgres
metadata:
some_stream_id:
table-key-properties: [id]
replication-key: created_at
replication-method: INCREMENTAL此示例将主键设置为id,将复制键设置为created_at。
关于通配符的最新情况(2022-03-30)
在@visch的注释中,通配符也可以在流名中用于同时匹配多个流。例如在下面的例子中:
extractors:
- name: tap-postgres
metadata:
"*":
# set all streams to "full table" mode
replication-method: FULL_TABLE和:
extractors:
- name: tap-postgres
metadata:
"*":
# ignore primary keys for all streams
table-key-properties: []https://stackoverflow.com/questions/71669574
复制相似问题