dean_morin
10/06/2021, 7:32 PMjsonb
field that I want to be treated as a ['null', 'string']
type rather than ['null', 'object', 'array']
.
I’ve added this to my `meltano.yml`:
schema:
public-a:
event_data:
type: ["null", "string"]
I saw this message which helped me find where the issue is happening in the tap. https://meltano.slack.com/archives/C01TCRBBJD7/p1631295595178100
The tap does discovery every time the job runs, and simply overwrites the provided schema with the discovered one.
How does this work in other taps? Is discovery normally done on every run?visch
10/07/2021, 12:06 PMtarget-postgres
?visch
10/07/2021, 12:08 PMmeltano elt
I'm pretty certain Discovery does run every time (You want to keep up with source schema changes)
meltano invoke
does not, due to wanting to cache the schema to make calls to things like meltano select
quickvisch
10/07/2021, 12:10 PMtap-abc -c config.json --catalog catalog.json
just get's ignored?
If we can start from the issue you're trying to solve it'll help me focus 😄visch
10/07/2021, 12:10 PMdean_morin
10/07/2021, 2:03 PMtap-postgres
& target-snowflake
(both transferwise variants and latest releases).
The end goal is for the field to be a varchar
in Snowflake rather than a variant
. At least that’s the immediate problem I’m trying to solve, although it may not fix the larger issue. I have a postres table with json blobs > 16MB, and the variant
type in Snowflake can only be <= 16MB. I’ve now realized varchar has the same limitation but maybe there’s a way to truncate larger values, but anyway I digress.
I’m running meltano elt
, but the catalog it passes to the tap isn’t respected, and I think I see why now. I’m pretty sure it only happens with LOG_BASED replication but I’m still experimenting a little. In the tap it’ll call this line https://github.com/transferwise/pipelinewise-tap-postgres/blob/master/tap_postgres/sync_strategies/logical_replication.py#L411 and run discovery and squash the schema in the provided catalog.dean_morin
10/07/2021, 2:16 PMtaylor
10/08/2021, 2:28 PMdean_morin
10/08/2021, 3:19 PMmatt_freeman
02/17/2022, 5:29 AM