silverbullet1
07/04/2023, 7:42 AMmeltano.yml
by following:
metadata:
foo-bar:
table-key-properties: [foo1, foo2, foo3]
replication-key: created_at
replication-method: INCREMENTAL
I can see that, when I run meltano invoke --dump=catalog my-tap > catalog.json
, I can see that the generated schema has the above PK’s in key_properties
, but when I run meltano --log-level debug run my-tap my-target
, the generated catalog has empty key-properties
.
I am using tap-postgres
as my sink (meltanolabs variant) and the tap is redshift(sdk variant under dev)
More logs in first commentsilverbullet1
07/04/2023, 7:43 AMsilverbullet1
07/04/2023, 7:43 AM2023-07-04T07:09:15.050063Z [debug ] Skipping node at '.streams[0].table_key_properties[0]'
2023-07-04T07:09:15.050131Z [debug ] Skipping node at '.streams[0].table_key_properties[1]'
2023-07-04T07:09:15.050226Z [debug ] Skipping node at '.streams[0].table_key_properties[2]'
2023-07-04T07:09:15.050305Z [debug ] Skipping node at '.streams[0].table_key_properties[3]'
2023-07-04T07:09:15.050421Z [debug ] Skipping node at '.streams[0].table_key_properties[4]'
2023-07-04T07:09:15.050537Z [debug ] Skipping node at '.streams[0].table_key_properties[5]'
2023-07-04T07:09:15.050677Z [debug ] Skipping node at '.streams[0].table_key_properties[6]'
2023-07-04T07:09:15.050873Z [debug ] Skipping node at '.streams[0].table_key_properties[7]'
2023-07-04T07:09:15.050997Z [debug ] Skipping node at '.streams[0].table_key_properties[8]'
2023-07-04T07:09:15.051175Z [debug ] Skipping node at '.streams[0].table_key_properties[9]'
2023-07-04T07:09:15.051303Z [debug ] Skipping node at '.streams[0].table_key_properties[10]'
2023-07-04T07:09:15.051428Z [debug ] Skipping node at '.streams[0].table_key_properties[11]'
2023-07-04T07:09:15.051505Z [debug ] Skipping node at '.streams[0].table_key_properties[12]'
2023-07-04T07:09:15.051609Z [debug ] Skipping node at '.streams[0].replication_key'
2023-07-04T07:09:15.055954Z [debug ] Invoking: ['/Users/me/Documents/opensource/tap-redshift/.meltano/extractors/tap-redshift/venv/bin/tap-redshift', '--config', '/Users/me/Documents/opensource/tap-redshift/.meltano/run/tap-redshift/tap.5087c065-6914-4c5a-9ef3-1036b6b7c841.config.json', '--catalog', '/Users/me/Documents/opensource/tap-redshift/.meltano/run/tap-redshift/tap.properties.json']
2023-07-04T07:09:15.121605Z [debug ] Variable '$TARGET_POSTGRES_SCHEMA' is not set in the provided env dictionary.
2023-07-04T07:09:15.171055Z [debug ] Variable '$TARGET_POSTGRES_SCHEMA' is not set in the provided env dictionary.
2023-07-04T07:09:15.172427Z [debug ] Created configuration at /Users/me/Documents/opensource/tap-redshift/.meltano/run/target-postgres/target.338d7179-1b1f-496d-bd0d-4991b0847313.config.json
2023-07-04T07:09:15.175249Z [debug ] Invoking: ['/Users/me/Documents/opensource/tap-redshift/.meltano/loaders/target-postgres/venv/bin/target-postgres', '--config', '/Users/me/Documents/opensource/tap-redshift/.meltano/run/target-postgres/target.338d7179-1b1f-496d-bd0d-4991b0847313.config.json']
2023-07-04T07:09:15.188743Z [debug ] waiting for process completion or exception
2023-07-04T07:09:16.010935Z [info ] 2023-07-04 12:39:16,010 | INFO | tap-redshift | Beginning incremental sync of 'foo-bar'... cmd_type=elb consumer=False name=tap-redshift producer=True stdio=stderr string_id=tap-redshift
2023-07-04T07:09:16.011317Z [info ] 2023-07-04 12:39:16,010 | INFO | tap-redshift | Tap has custom mapper. Using 1 provided map(s). cmd_type=elb consumer=False name=tap-redshift producer=True stdio=stderr string_id=tap-redshift
2023-07-04T07:09:16.011654Z [info ] {"type": "SCHEMA", "stream": "foo-bar", "schema": {"properties": {"foo1": {"type": ["integer", "null"]}, "foo2": {"type": ["integer", "null"]}, "foo3": {"type": ["integer", "null"]}, "created_at": {"format": "date-time", "type": ["string", "null"]}, "updated_at": {"format": "date-time", "type": ["string", "null"]}}, "type": "object"}, "key_properties": [], "bookmark_properties": ["created_at"]} cmd_type=elb consumer=False name=tap-redshift producer=True stdio=stdout string_id=tap-redshift
silverbullet1
07/04/2023, 7:44 AMmeltano select tap-redshift --list
then I can see every col is selected.silverbullet1
07/05/2023, 5:49 PMedgar_ramirez_mondragon
07/05/2023, 7:39 PM.meltano/run/tap-redshift/
?
Related issues:
• https://github.com/meltano/meltano/issues/2848
• https://github.com/meltano/meltano/issues/2856silverbullet1
07/06/2023, 5:26 AMmeltano run …
2023-07-06T05:23:32.346509Z [debug ] Cached catalog is outdated, running discovery...
but the generated catalog is same as my initial logs with empty key_properties
.
meltano invoke --dump=catalog tap-redshift > catalog1.json
is still generating the correct catalog.silverbullet1
07/06/2023, 6:38 AMmeltano elt tap-redshift target-postgres --catalog catalog.json
, it still doesn’t read the key_properties
from table_key_properties
in the catalog 🤔
Moreover, this is not a view, so the mapping should be there.silverbullet1
07/06/2023, 7:34 AMtable-key-properties
instead of key-properties
, kinda confusing names