8000 Add optional flags argument to regex tests by tconbeer · Pull Request #247 · calogica/dbt-expectations · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add optional flags argument to regex tests #247

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

Merged
merged 3 commits into from
Mar 11, 2023
Merged

Conversation

tconbeer
Copy link
Contributor
@tconbeer tconbeer commented Mar 10, 2023

Closes #245

I chose to validate the flag against the lists in the documentation for Postgres, Snowflake, and Redshift. I decided to raise an error if flags are passed to BQ (since they are not supported) or the "default" implementation (unclear support).

One alternative to raising on all flags for those adapters would be to specifically check for the i flag and lowercase the column before passing it to regexp_instr.

@clausherther
Copy link
Contributor

Cool, thanks @tconbeer, will take a look this weekend.
Btw, the compatibility check for BQ causes CI to fail, so we'll have to come with another way to handle this before this can be merged:

The flag option is not supported for by BigQuery

Copy link
Contributor
@clausherther clausherther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, really well done, thanks!
Pending other PRs, I'll release this in 0.8.3 next week.

@clausherther clausherther merged commit 84a984f into calogica:main Mar 11, 2023
@tconbeer
Copy link
Contributor Author

Thanks, @clausherther ! Love this package

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

Successfully merging this pull request may close these issues.

[Feature Request] Allow regex flags/parameters in regexp_instr and calling tests
2 participants
0