Is there any functionality to override schema attr...
# announcements
a
Is there any functionality to override schema attributes? When I manually run a singer tap, I can update modify the catalog file to override the data types that are generated. Can I do anything similar using meltano config?
d
@adam_roderick I actually just had a long conversation about that with @emre in https://meltano.slack.com/archives/CFG3C3C66/p1594045193433500, which led to the creation of https://gitlab.com/meltano/meltano/-/issues/2145! Please weigh in there if you have any more thoughts or suggestions 🙂
@emre @adam_roderick I've commented onhttps://gitlab.com/meltano/meltano/-/issues/2145; please let me know what you think!
a
Looking good. Let me think a bit and will comment
e
Looks great! Feels intuitive and keeping things consistent with metadata manipulation is a plus.
a
Agree, the consistency w/ metadata is a big plus
Between the two alternative CLI commands, I prefer the second
d
They're equivalent anyway, they'll both work 🙂
The former makes it a little more clear that you're actually overriding the existing schema for that property, instead of just adding values to what may already be there
e
wait, so the latter version appends the key value pair if the key doesnt exists, and overwrites only if the key exists right?
d
meltano config
appends to or overwrites in
meltano.yml
, but the idea is that if there's anything in
meltano.yml
, that will overwrite whatever's currently in the catalog file
Otherwise,
anyOf
would survive unless we explicitly say we don't want it
With
meltano config tap-google-sheets set schema repcalls wait_duration -- {"type": ["null", "integer"]}
, it's clear from the way it's written that we're overwriting the entirety of the
wait_duration
schema definition. That's less obvious in
meltano config tap-google-sheets set schema repcalls wait_duration type -- ["null", "integer"]
, but they will both actually have the same effect, since the result in
meltano.yml
is identical
e
Alright, sounds good.
d
This shouldn't be too hard to implement since it builds on the existing config and metadata functionality, but I'm not confident I'll get to it this week— are you currently blocked by this or do you have a workaround for the moment?
e
I’m good, no rush.