Skip to content

Add validations when materializing from file sources - #1615

Merged
feast-ci-bot merged 2 commits into
feast-dev:masterfrom
achals:achal/file-materialize-entity-join-keys
Jun 3, 2021
Merged

Add validations when materializing from file sources#1615
feast-ci-bot merged 2 commits into
feast-dev:masterfrom
achals:achal/file-materialize-entity-join-keys

Conversation

@achals

@achals achals commented Jun 2, 2021

Copy link
Copy Markdown
Member

Signed-off-by: Achal Shah achals@gmail.com

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 

Signed-off-by: Achal Shah <achals@gmail.com>
@codecov-commenter

codecov-commenter commented Jun 2, 2021

Copy link
Copy Markdown

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.

Signed-off-by: Achal Shah <achals@gmail.com>
@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
Copy Markdown
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

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

@woop

woop commented Jun 3, 2021

Copy link
Copy Markdown
Member

/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 <achals@gmail.com>

* Dedupe columns when extracting from the dataframe

Signed-off-by: Achal Shah <achals@gmail.com>
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