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

[feat] case insensitivity #4

Closed
hbwhbw opened this issue Jan 31, 2022 · 2 comments
Closed

[feat] case insensitivity #4

hbwhbw opened this issue Jan 31, 2022 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@hbwhbw
Copy link

hbwhbw commented Jan 31, 2022

In our environment people write everything in lower case including both the SQL and the YML. It looks like the SNOWFLAKE adapter consistently returns column names as upper case. Can you provide an option to ignore case in comparisons of column names between the YML version and the DB?

I "fixed" this locally by changing this line to read c.name.lower() in the obvious place:

columns = [c.name for c in adapter.get_columns_in_relation(table)]

But you might instead want to keep that case and modify all the places where you compare columns to do a case insensitive comparison. Looks like you're using python sets for the different column lists. I don't know how you'd make them case insensitive, so just adding the lower() maybe as a configuration would be great.

@z3z1ma z3z1ma self-assigned this Feb 27, 2022
@z3z1ma z3z1ma added the good first issue Good for newcomers label Feb 27, 2022
@kylebutler-sf
Copy link

I think I'm running into the same issue? It's running this several times:
describe table None

@z3z1ma
Copy link
Owner

z3z1ma commented Jun 6, 2022

I am going to mark this as resolved as my last commit has made column comparison case insensitive. Can you post another issue @kylebutler-sf with a stack trace and I am happy to take a look.

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

No branches or pull requests

3 participants