Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

REGEX use on a collated VARCHAR column in Snowflake causes error #201

Open
ScottAtDisney opened this issue Feb 1, 2022 · 1 comment
Open
Labels
bug Something isn't working soda-sql

Comments

@ScottAtDisney
Copy link

Describe the bug
If a Snowflake VARCHAR column is defined with collation, REGEX functions cause an error.

To Reproduce
Steps to reproduce the behavior:

  1. Create a VARCHAR column in a Snowflake table
  2. Run soda analyze ...
  3. Or write scan file with valid_regex entry for column
  4. Run soda scan ... using that scan file

Context
Snowflake does not support REGEX on collated columns.
Collation can be removed from a column by wrapping the expression in,
COLLATE({expr}, '')

OS: Mac OS Big Sur version 11.6
Python Version: Python 3.9.10
Soda SQL Version: 2.1.2
Warehouse Type: Snowflake

@ScottAtDisney ScottAtDisney added bug Something isn't working soda-sql labels Feb 1, 2022
@ScottAtDisney
Copy link
Author

Fix is in the branch 665-snowflake-collation. Though this removes collation from all VARCHAR columns, collated or not. While this is benign, it is unnecessary. Would it be more appropriate to have a conditional or some other way to select this feature?

@vijaykiran vijaykiran transferred this issue from sodadata/soda-core Mar 22, 2022
@vijaykiran vijaykiran transferred this issue from sodadata/soda-core Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working soda-sql
Projects
None yet
Development

No branches or pull requests

1 participant