The CLI has a way to add select patterns to an ext...
# getting-started
j
The CLI has a way to add select patterns to an extractor, but is there a CLI command for removing a select pattern from an extractor? Doesn’t seem like it in the docs.
a
That’s a good question. And you don’t mean establishing an exclusion, right? You mean removing a selection? The way I would do it is just delete the line from
meltano.yml
.
j
That’s correct I do NOT mean establishing an exclusion. For now I did exactly that. I deleted the entire
select
portion of
meltano.yml
. This is just fine for a one off edit, but I’m trying to loop through a series of databases where the schema names will change from database to database but the table names will not requiring a complete refresh of select patterns. I’m removing the
select
configuration section through reading and rewriting the file currently but it would be handy to have a
meltano select --remove <tap_name>  [ENTITIES_PATTERN] [ATTRIBUTE_PATTERN]
. Just a thought 🙂
a
Yeah, that sounds like it would be handy. Do you want to log that in our issue tracker? And if I understand your use case, you might be interested to try ‘inherit_from’ syntax to establish a set of named table groups each with their own selection pattern, then parameterize the connection info as you are doing already.
Maybe this doesn’t fit your use case, but just in case: https://gitlab.com/meltano/hub/-/blob/main/meltano/meltano.yml#L6 Here’s an example where for our project, we wanted the ability to quickly run a different set of select rules - so there’s one main entry and two entries which each only override the select rules.
I guess another application of this pattern would be to create disposable
--inherit-from
extractor entries via the cli, each with their own select rules, and then just remove them / recreate them when you want a reset.