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

Silent Mode Option to Suppress UnsupportedStatementException #513

Closed
reata opened this issue Dec 25, 2023 · 0 comments · Fixed by #509
Closed

Silent Mode Option to Suppress UnsupportedStatementException #513

reata opened this issue Dec 25, 2023 · 0 comments · Fixed by #509
Labels
enhancement New feature or request

Comments

@reata
Copy link
Owner

reata commented Dec 25, 2023

Currently when using any dialect other than non-validating, namely sqlfluff parse implementation, SQLLineage needs to know the statement type before analyzing it.

For example, SelectExtractor supports statement type of ["select_statement", "set_expression", "bracketed"]. And we have a special-purpose NoopExtractor to whitelist a bunch of statement types where no lineage can be extracted.

This whitelist approach solves a problem from non-validating dialect, where we don't know what statement we support. And when user reports a exception, it's hard to tell whether it's a bug or feature.

However, this comes at cost that for statement type we haven't included in the whitelist an UnsupportedStatementException will be thrown. Catch the exception is one way.

In this proposal we'd also like to introduce a new silent_mode option to throw warnings instead of exception.

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

Successfully merging a pull request may close this issue.

1 participant