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

Implement Redshift historical retrieval #1720

Merged
merged 12 commits into from
Jul 23, 2021

Conversation

tsotnet
Copy link
Collaborator

@tsotnet tsotnet commented Jul 19, 2021

Signed-off-by: Tsotne Tabidze [email protected]

What this PR does / why we need it: This PR implements RedfshiftOfflineStore:get_historical_features. Also refactored couple of methods from bigquery.py and moved them in common_utils.py so that both RedshiftOfflineStore and BigQueryOfflineStore can use them.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Implement historical retrieval for Redshift

@woop
Copy link
Member

woop commented Jul 19, 2021

Directionally this PR looks good to me.

Copy link
Member

@achals achals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[30%] looks right to me

Tsotne Tabidze added 3 commits July 20, 2021 13:34
Fixed get_historical_features where entity_df is a SQL query, while keeping the utility functions common between Redshift and BigQuery. `infer_event_timestamp_from_entity_df` and `assert_expected_columns_in_entity_df` are now based on the entity schema rather than the dataframe.
I also completely removed the min/max timestamp inference, since those could not be merged (needed to query BigQuery and Redshift). Instead, I moved the logic inside the SQL templates, reducing the code complexity.

Signed-off-by: Tsotne Tabidze <[email protected]>
Signed-off-by: Tsotne Tabidze <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2021

Codecov Report

Merging #1720 (43cc0c3) into master (7dff49a) will increase coverage by 0.31%.
The diff coverage is 92.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1720      +/-   ##
==========================================
+ Coverage   78.69%   79.01%   +0.31%     
==========================================
  Files          80       80              
  Lines        6765     6849      +84     
==========================================
+ Hits         5324     5412      +88     
+ Misses       1441     1437       -4     
Flag Coverage Δ
integrationtests 78.96% <92.74%> (+0.34%) ⬆️
unittests 61.75% <34.95%> (-0.45%) ⬇️

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

Impacted Files Coverage Δ
sdk/python/feast/infra/provider.py 89.09% <ø> (-0.10%) ⬇️
sdk/python/feast/data_source.py 56.19% <50.00%> (-0.06%) ⬇️
sdk/python/feast/errors.py 70.52% <66.66%> (-0.27%) ⬇️
sdk/python/feast/infra/offline_stores/redshift.py 90.90% <83.87%> (-0.76%) ⬇️
...python/feast/infra/offline_stores/offline_utils.py 91.11% <91.11%> (ø)
sdk/python/feast/infra/offline_stores/bigquery.py 80.30% <95.83%> (-0.81%) ⬇️
...gration/offline_store/test_historical_retrieval.py 98.94% <98.48%> (-0.21%) ⬇️
sdk/python/feast/driver_test_data.py 100.00% <100.00%> (ø)
sdk/python/feast/infra/aws.py 100.00% <100.00%> (ø)
sdk/python/feast/infra/gcp.py 100.00% <100.00%> (ø)
... and 7 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 7dff49a...43cc0c3. Read the comment docs.

Co-authored-by: Willem Pienaar <[email protected]>
Signed-off-by: Tsotne Tabidze <[email protected]>
@tsotnet tsotnet force-pushed the redshift_historical_retrieval branch from 44154ee to 1da26bf Compare July 21, 2021 18:06
@tsotnet tsotnet added the kind/feature New feature or request label Jul 21, 2021
@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tsotnet, 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 Jul 23, 2021

/lgtm

@feast-ci-bot feast-ci-bot merged commit bf557bc into feast-dev:master Jul 23, 2021
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.

5 participants