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 materialization for RedshiftOfflineStore & RedshiftRetrievalJob #1680

Merged
merged 5 commits into from
Jul 15, 2021

Conversation

tsotnet
Copy link
Collaborator

@tsotnet tsotnet commented Jul 2, 2021

Signed-off-by: Tsotne Tabidze tsotne@tecton.ai

What this PR does / why we need it: This PR makes it possible to materialize data from Redshift to online stores. Also added half of test_offline_online_store_consistency.py for Redshift (for now we're only asserting online store after materialization from Redshift and don't check offline store by calling get_historical_features, since that functionality is not yet implemented). This required implementing unload/copy logic through S3. RedshiftRetrievalJob is also fully implemented (to_df, to_arrow, to_s3, to_redshift).

Lastly, needed to add iam_role to the redshift config. This role is necessary for Redshift to access S3. It'll need to be setup by the user (both the role creation, and association to Redshift).

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Adds materialization logic for RedshiftOfflineStore

Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
@tsotnet tsotnet added the kind/feature New feature or request label Jul 2, 2021
@tsotnet tsotnet requested review from achals and woop July 2, 2021 07:00
@tsotnet tsotnet requested a review from a team as a code owner July 2, 2021 07:00
@codecov-commenter
Copy link

codecov-commenter commented Jul 2, 2021

Codecov Report

Merging #1680 (fa0c494) into master (0d0492d) will decrease coverage by 13.64%.
The diff coverage is 36.79%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1680       +/-   ##
===========================================
- Coverage   82.75%   69.10%   -13.65%     
===========================================
  Files          76       76               
  Lines        6754     6817       +63     
===========================================
- Hits         5589     4711      -878     
- Misses       1165     2106      +941     
Flag Coverage Δ
integrationtests ?
unittests 69.10% <36.79%> (-0.63%) ⬇️

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

Impacted Files Coverage Δ
sdk/python/tests/test_entity.py 100.00% <ø> (+15.21%) ⬆️
sdk/python/feast/data_source.py 60.15% <6.66%> (-6.52%) ⬇️
sdk/python/feast/type_map.py 41.66% <31.57%> (-0.80%) ⬇️
sdk/python/feast/infra/utils/aws_utils.py 32.60% <32.60%> (ø)
sdk/python/feast/infra/offline_stores/redshift.py 55.93% <34.21%> (ø)
...hon/tests/test_offline_online_store_consistency.py 58.33% <55.55%> (-41.67%) ⬇️
...dk/python/tensorflow_metadata/proto/v0/path_pb2.py 100.00% <100.00%> (ø)
.../python/tensorflow_metadata/proto/v0/schema_pb2.py 100.00% <100.00%> (ø)
...hon/tensorflow_metadata/proto/v0/statistics_pb2.py 100.00% <100.00%> (ø)
sdk/python/tests/test_online_retrieval.py 17.39% <0.00%> (-82.61%) ⬇️
... and 38 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 0d0492d...fa0c494. Read the comment docs.

Tsotne Tabidze added 3 commits July 12, 2021 14:03
Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
@woop
Copy link
Member

woop commented Jul 15, 2021

/lgtm

@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

@feast-ci-bot feast-ci-bot merged commit 8287b56 into feast-dev:master Jul 15, 2021
SourdoughCat pushed a commit to SourdoughCat/feast that referenced this pull request Jul 16, 2021
…lJob (feast-dev#1680)

* Implement materialization for RedshiftOfflineStore

Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>

* Address Willem's comments

Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>

* Rename method

Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
Signed-off-by: CS <2498638+charliec443@users.noreply.github.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