astro-sdk
astro-sdk copied to clipboard
Snowflake - Add quotes on col names to preserve the casing
Description
What is the current behavior?
Currently, we were changing the case of col names to lowercase for snowflakes. Which trips user.
closes: #917
What is the new behavior?
We can keep the col names intact by passing them in quotes when creating tables added quotes. We no longer need the ColCapitalization feature.
Does this introduce a breaking change?
Yes
Checklist
- [ ] Created tests which fail without the change (if possible)
- [ ] Extended the README / documentation, if necessary
Codecov Report
Base: 91.51% // Head: 93.66% // Increases project coverage by +2.15%
:tada:
Coverage data is based on head (
e43a27b
) compared to base (c7dd997
). Patch coverage: 87.23% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## main #1050 +/- ##
==========================================
+ Coverage 91.51% 93.66% +2.15%
==========================================
Files 12 64 +52
Lines 436 2985 +2549
Branches 42 333 +291
==========================================
+ Hits 399 2796 +2397
- Misses 27 130 +103
- Partials 10 59 +49
Impacted Files | Coverage Δ | |
---|---|---|
python-sdk/src/astro/sql/operators/dataframe.py | 97.00% <ø> (ø) |
|
python-sdk/src/astro/databases/snowflake.py | 95.39% <86.95%> (ø) |
|
python-sdk/src/astro/databases/base.py | 96.00% <100.00%> (ø) |
|
python-sdk/src/astro/files/types/ndjson.py | 100.00% <0.00%> (ø) |
|
python-sdk/src/astro/databases/postgres.py | 96.29% <0.00%> (ø) |
|
python-sdk/src/astro/files/locations/local.py | 100.00% <0.00%> (ø) |
|
python-sdk/src/astro/utils/table.py | 94.28% <0.00%> (ø) |
|
python-sdk/src/astro/databases/__init__.py | 88.88% <0.00%> (ø) |
|
... and 45 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@pankajastro @sunank200 need your feedback on this PR
@pankajastro @sunank200 need your feedback on this PR
I still think python-sdk does not change the column, the snowflake DB store it in capital unless we pass it in quotes. So I'm not sure about preserving the col name by putting quotes from our side is the right idea or not.
Otherwise, it looking good to me but we still have some open review feedback
oh, user-facing docs are missing
We have a separate issue for this https://github.com/astronomer/astro-sdk/issues/1098

