Skip to content

fix: Remove extra quoting in snowflake python connection#2601

Closed
esadler-hbo wants to merge 1 commit into
feast-dev:masterfrom
esadler-hbo:bug-snowflake-rm-bad-quotes
Closed

fix: Remove extra quoting in snowflake python connection#2601
esadler-hbo wants to merge 1 commit into
feast-dev:masterfrom
esadler-hbo:bug-snowflake-rm-bad-quotes

Conversation

@esadler-hbo

Copy link
Copy Markdown

Signed-off-by: Evan evan.sadler@warnermedia.com

What this PR does / why we need it:
Possible extra quotes. Need to verify by running integration tests.

Which issue(s) this PR fixes:
#2595

Fixes #

Signed-off-by: Evan <evan.sadler@warnermedia.com>
@feast-ci-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: esadler-hbo
To complete the pull request process, please assign woop after the PR has been reviewed.
You can assign the PR to them by writing /assign @woop in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@esadler-hbo esadler-hbo changed the title fix: remove extra quoting in snowflake python connection fix: Remove extra quoting in snowflake python connection Apr 22, 2022
@esadler-hbo

Copy link
Copy Markdown
Author

/assign @woop

I noticed an issue for me, but obviously the quotes could be important for somethings. I was hoping to throw up a PR that would run the python integration test suite.

Also let me know if you have ideas on how to test this more officially than editing the repo locally. I'm sure it is possible, but I am new to this repo!

@achals

achals commented Apr 22, 2022

Copy link
Copy Markdown
Member

/ok-to-test

@codecov-commenter

codecov-commenter commented Apr 22, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2601 (5759f07) into master (c439611) will decrease coverage by 22.46%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master    #2601       +/-   ##
===========================================
- Coverage   82.30%   59.84%   -22.47%     
===========================================
  Files         155      153        -2     
  Lines       12747    12620      -127     
===========================================
- Hits        10492     7553     -2939     
- Misses       2255     5067     +2812     
Flag Coverage Δ
integrationtests ?
unittests 59.84% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdk/python/feast/infra/utils/snowflake_utils.py 23.20% <ø> (-59.62%) ⬇️
.../integration/online_store/test_online_retrieval.py 16.84% <0.00%> (-83.16%) ⬇️
sdk/python/tests/utils/online_read_write_test.py 19.35% <0.00%> (-80.65%) ⬇️
.../integration/online_store/test_universal_online.py 16.83% <0.00%> (-78.01%) ⬇️
...fline_store/test_universal_historical_retrieval.py 23.88% <0.00%> (-76.12%) ⬇️
...ests/integration/e2e/test_python_feature_server.py 28.57% <0.00%> (-71.43%) ⬇️
...gration/registration/test_feature_service_apply.py 31.25% <0.00%> (-68.75%) ⬇️
sdk/python/feast/infra/online_stores/redis.py 28.39% <0.00%> (-67.91%) ⬇️
sdk/python/tests/integration/e2e/test_usage_e2e.py 33.87% <0.00%> (-66.13%) ⬇️
...dk/python/tests/integration/e2e/test_validation.py 33.92% <0.00%> (-66.08%) ⬇️
... and 68 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c439611...5759f07. Read the comment docs.

@achals

achals commented Apr 22, 2022

Copy link
Copy Markdown
Member

@sfc-gh-madkins If I remember correctly you added this quite recently, could you take a look?

@esadler-hbo do you mind adding a test or something that reproduces the issue in #2595 without this patch?

@sfc-gh-madkins

Copy link
Copy Markdown
Collaborator

would be great to understand what your feature_store.yaml / config file looks like?

@esadler-hbo

esadler-hbo commented Apr 22, 2022

Copy link
Copy Markdown
Author

would be great to understand what your feature_store.yaml / config file looks like?

I could totally be doing this wrong, but this is what I had. I did not use quotes for any of the filled in values except the config path. Not filling in because I probably shouldn't share.

# feature_store.yaml
project: firm_finch
registry: registry.db
provider: local
offline_store:
    type: snowflake.offline
    account: 
    user: 
    password: 
    role:
    warehouse:
    database:
    schema:
    config_path: "Users/.../config.ini"

The config file

[connections.feast_offline_store]
private_key_passphrase = phrase
private_key = path_to_key

@esadler-hbo

Copy link
Copy Markdown
Author

@sfc-gh-madkins If I remember correctly you added this quite recently, could you take a look?

@esadler-hbo do you mind adding a test or something that reproduces the issue in #2595 without this patch?

Happy to add a test once @sfc-gh-madkins lets me know if my config setup makes sense. I just need to get setup with a test environment and then getting some direction to where and how be much appreciated.

@sfc-gh-madkins

Copy link
Copy Markdown
Collaborator

my guess is you are not respecting case sensitivity -- most likely your warehouse is ALL CAPS in Snowflake but you are putting it in lowercase in your config file

Currently feast is using double quoted identifier syntax -- see https://docs.snowflake.com/en/sql-reference/identifiers-syntax.html

i appreciate that this is not documented well in the feast docs

@esadler-hbo

Copy link
Copy Markdown
Author

my guess is you are not respecting case sensitivity -- most likely your warehouse is ALL CAPS in Snowflake but you are putting it in lowercase in your config file

Currently feast is using double quoted identifier syntax -- see https://docs.snowflake.com/en/sql-reference/identifiers-syntax.html

i appreciate that this is not documented well in the feast docs

Well I reset my environment and I couldn't reproduce the issue. Sorry to bother you all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants