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

Add validations when materializing from file sources #1615

Merged

Conversation

achals
Copy link
Member

@achals achals commented Jun 2, 2021

Signed-off-by: Achal Shah [email protected]

What this PR does / why we need it:
This PR validate join keys when materializing from file sources, to make sure that the join keys are present in the dataframe columns. Additionally, we dedupe column names when extracting columns from the pandas dataframe. This should specifically catch the case of event_timestamp_column and created_timestamp_column pointing to the same column name.

Additionally, this fixes a bug where the EntityNotFoundException was instantiated with the entity name and project name switched.
Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Add validations when materializing from file sources 

@codecov-commenter
Copy link

codecov-commenter commented Jun 2, 2021

Codecov Report

Merging #1615 (f5e62a2) into master (f29cb8c) will increase coverage by 0.07%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1615      +/-   ##
==========================================
+ Coverage   83.57%   83.64%   +0.07%     
==========================================
  Files          65       67       +2     
  Lines        5771     5816      +45     
==========================================
+ Hits         4823     4865      +42     
- Misses        948      951       +3     
Flag Coverage Δ
integrationtests 83.56% <66.66%> (+0.07%) ⬆️
unittests 77.85% <66.66%> (+0.51%) ⬆️

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

Impacted Files Coverage Δ
sdk/python/feast/registry.py 79.11% <0.00%> (ø)
sdk/python/feast/infra/offline_stores/file.py 96.73% <80.00%> (-0.99%) ⬇️
sdk/python/feast/feature_store.py 91.85% <0.00%> (-0.04%) ⬇️
sdk/python/tests/conftest.py 100.00% <0.00%> (ø)
sdk/python/tests/test_feature_store.py 100.00% <0.00%> (ø)
sdk/python/tests/fixtures/data_source_fixtures.py
sdk/python/feast/inference.py 95.45% <0.00%> (ø)
sdk/python/tests/utils/data_source_utils.py 100.00% <0.00%> (ø)
sdk/python/tests/test_inference.py 100.00% <0.00%> (ø)
sdk/python/feast/repo_operations.py 32.17% <0.00%> (+0.17%) ⬆️

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 f29cb8c...f5e62a2. Read the comment docs.

@achals achals changed the title Validate join keys when materializing from file sources Add validations when materializing from file sources Jun 2, 2021
@achals achals added the kind/bug label Jun 3, 2021
@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: achals, woop

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

The pull request process is described here

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

@woop
Copy link
Member

woop commented Jun 3, 2021

/lgtm

@feast-ci-bot feast-ci-bot merged commit 99ee2ce into feast-dev:master Jun 3, 2021
@achals achals deleted the achal/file-materialize-entity-join-keys branch June 3, 2021 15:27
woop pushed a commit that referenced this pull request Jun 7, 2021
* Validate join keys when materializing from file sources

Signed-off-by: Achal Shah <[email protected]>

* Dedupe columns when extracting from the dataframe

Signed-off-by: Achal Shah <[email protected]>
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.

4 participants