lin_liu
08/26/2022, 1:44 AMUndefinedColumn: column "hash_key" named in key does not exist cmd_type=loader) before, regarding tap-dynamo-totarget-postgres.
I got this err from yesterday, relevant chat link here https://meltano.slack.com/archives/C01TCRBBJD7/p1661400699522009. I have check my local dynamodb and found we already have hash_key and range_key configured.
Currently stuck here, any clues or guidance would be much appreciated!
Thank you 🙏aaronsteers
08/26/2022, 1:50 AMaaronsteers
08/26/2022, 1:52 AMlin_liu
08/26/2022, 1:53 AMaaronsteers
08/26/2022, 1:55 AMlin_liu
08/26/2022, 1:57 AMaaronsteers
08/26/2022, 1:57 AMlin_liu
08/26/2022, 1:58 AMchristoph
08/26/2022, 4:37 AMSCHEMA line which just says {"type":"object"} ...:
2022-08-25T06:26:10.636381Z [info ] INFO Starting sync. cmd_type=extractor name=tap-kamprad run_id=8a128b5d-12db-484c-aa61-1d1e894337a8 state_id=2022-08-25T062605--tap-kamprad--target-warehouse-postgres stdio=stderr
2022-08-25T06:26:10.636990Z [debug ] {"type": "STATE", "value": {}} cmd_type=extractor name=tap-kamprad (out) run_id=8a128b5d-12db-484c-aa61-1d1e894337a8 state_id=2022-08-25T062605--tap-kamprad--target-warehouse-postgres stdio=stdout
2022-08-25T06:26:10.637235Z [debug ] {"type": "SCHEMA", "stream": "ktest", "schema": {"type": "object"}, "key_properties": ["hash_key", "range_key"]} cmd_type=extractor name=tap-kamprad (out) run_id=8a128b5d-12db-484c-aa61-1d1e894337a8 state_id=2022-08-25T062605--tap-kamprad--target-warehouse-postgres stdio=stdout
The original Gitlab issue is here: https://gitlab.com/meltano/meltano/-/issues/2216
Douwe's implementation of the feature here: https://gitlab.com/meltano/meltano/-/merge_requests/1843/diffs
And the relevant Meltano Docs link for the schema extra which is how the source schema of your DynamoDB table needs to be announced to meltano due to the limitation of the tap being able to inspect its source for dynamic catalog (schema) discovery:
https://docs.meltano.com/concepts/plugins#schema-extralin_liu
08/26/2022, 4:46 AMlin_liu
08/26/2022, 4:46 AMchristoph
08/26/2022, 4:57 AMgenson to generate a JSON Schema from the sample data:
https://github.com/wolverdude/GenSON
And then you can you can use that generated JSON schema to configure the schema extra for your stream in the meltano.ymllin_liu
08/26/2022, 5:00 AM[info ] INFO Unknown replication method: None for stream ktest , I actually added it (FULL_TABLE)to catalog.json filechristoph
08/26/2022, 8:15 AMmeltano.yml and not in the catalog.jsonlin_liu
08/26/2022, 11:13 AM2022-08-26T11:00:45.535353Z [debug ] Setting '.streams[0].metadata[0].metadata.selected' to 'False'
2022-08-26T11:00:45.535419Z [debug ] Setting '.streams[0].metadata[0].metadata.selected' to 'True'
2022-08-26T11:00:45.535484Z [debug ] Setting '.streams[0].metadata[0].metadata.replication-method' to 'FULL_TABLE'
2022-08-26T11:00:45.535581Z [debug ] Skipping node at '.streams[0].metadata[0].metadata.table-key-properties[0]'
2022-08-26T11:00:45.535655Z [debug ] Skipping node at '.streams[0].metadata[0].metadata.table-key-properties[1]'
I found I should put metadata attribute at the position of first index in metadata array, and now it works basically 🤣