Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for include AND exclude filters #10192

Closed
MichaelTiemannOSC opened this issue Feb 12, 2023 · 1 comment · Fixed by #16826
Closed

Implement support for include AND exclude filters #10192

MichaelTiemannOSC opened this issue Feb 12, 2023 · 1 comment · Fixed by #16826
Assignees
Labels
enhancement New feature or request Ingestion

Comments

@MichaelTiemannOSC
Copy link

MichaelTiemannOSC commented Feb 12, 2023

Is your feature request related to a problem? Please describe.
We have a standard way of creating data tables, with prefixes at the front and suffixes at the end. I'd like to ingest metadata based on both, including tables that match the prefix and excluding ones that match the suffix. Here's what I need to do today to get all tables that start with _rmi and don't end with _source:

^rmi_.+(?<!_source)$

Describe the solution you'd like
What I'd like to be able to do is to specify the include regex asrmi_.*, the exclude rule as .*_source and have OpenMetadata first select all the tables that match the include rule, then discard all the tables that match the exclude rule.

Describe alternatives you've considered
The alternative is to right extremely ugly and fragile regexes, as you can see above.

Additional context
I looked at the source code here, and it's clear that if there's an include rule, the rule is run and exclude is TOTALLY IGNORED. It would be nice if the GUI said something about that, or even better, greyed out the exclude regex when there's also an include regex. As it is, when I provide both patterns, OM silently drops the exclude rule.

https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/src/metadata/utils/filters.py

Again, what I'd really like it to do is run all the includes (if any) and then all the excludes to pare that down. If no include regexes are given, then all tables are included, and exclude would work against the complete list, just as before.

@MichaelTiemannOSC MichaelTiemannOSC added the enhancement New feature or request label Feb 12, 2023
@MichaelTiemannOSC
Copy link
Author

Related: dbt-labs/dbt-core#5009

@pmbrull pmbrull moved this to 🔖 Ready in Release 1.0 Apr 11, 2023
@pmbrull pmbrull removed this from Release 1.0 Apr 11, 2023
@harshach harshach moved this to Ingestion in Release 1.1 May 8, 2023
@pmbrull pmbrull removed this from Release 1.1 May 9, 2023
@pmbrull pmbrull added this to Backlog May 9, 2023
@harshach harshach removed this from Backlog Mar 17, 2024
pmbrull added a commit to pmbrull/OpenMetadata that referenced this issue Jun 27, 2024
pmbrull added a commit to pmbrull/OpenMetadata that referenced this issue Jul 2, 2024
pmbrull added a commit to pmbrull/OpenMetadata that referenced this issue Jul 2, 2024
pmbrull added a commit that referenced this issue Jul 11, 2024
* encrypt jwt

* encrypt jwt

* Handle token revokes with SM

* #10192 - Validate both include and excludes filters

* #10192 - Validate both include and excludes filters

* docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Ingestion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants