Hi, is it possible to pass custom catalog file to ...
# announcements
o
Hi, is it possible to pass custom catalog file to a tap when calling the elt command?
d
@or_barda
meltano elt
will look for a catalog file at
.meltano/run/<tap>/tap.properties.json
. If the tap has the
discover
capability, Meltano will automatically run it, it apply the selection, metadata and schema rules, and put the file there, overriding anything you may have put there yourself. However, if you remove the
discover
capability, Meltano will not try to generate its own catalog and will use the one you provided at that location instead. That means that you could put the catalog file in your project outside of
.meltano
, and
cp
it to the desired location ahead of calling
meltano elt
. Would that work for you?
o
Got it, and that's actually what I'm doing but I have the same schema for multiple taps of the same type and I didn't want to copy this for all of them.
d
Ah, all right, makes sense. Would you mind creating an issue so we can consider adding a
--catalog
flag or something like that? 🙂
I'm curious why the
select
,
schema
and
metadata
extras weren't sufficient for your use case though. Is there anything else we could add there to make it more useful for you?
o
So what happen is that I want to optimize one of the taps, so what I'm doing is splitting its objects and write them to the meltano.yml as different taps and by this I'm able to run them in parallel
d
Ah, clever 🙂 When you say "splitting its objects", do you mean each tap selects a different set of Singer streams? Or they all use the same catalog, but select different objects based on some setting?
If they all use the same catalog (as you seemed to suggest earlier), is your reason for preferring to manually provide it then that you don't want to repeat the same list of
select
rules in
meltano.yml
multiple times? You could consider using YAML anchors instead. Here's a GitLab CI-specific example, but it's a stock YAML feature: https://docs.gitlab.com/ee/ci/yaml/#anchors
Instead of specifying the same tap multiple times in
meltano.yml
, note that you can also override configuration on a per-
meltano elt
run basis: https://meltano.com/docs/command-line-interface.html#pipeline-specific-configuration
@or_barda I've created a new issue that would help here: https://gitlab.com/meltano/meltano/-/issues/2291
@or_barda FYI: If you're still manually putting files at
.meltano/*run*/<extractor>/tap.properties.json
, the second paragraph here will be relevant to you once you upgrade: https://meltano.slack.com/archives/CP8K1MXAN/p1599510962005300