-
Notifications
You must be signed in to change notification settings - Fork 994
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
Pyspark job for feature batch retrieval #1021
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
afbf7cf
Pyspark job for feature batch retrieval
khorshuheng 675a952
Add pyspark to ci requirements
khorshuheng dbe6192
Additional documentation and col mapping
khorshuheng 30be3a5
Add Schema validation
khorshuheng 7522b88
Improve test case and documentation
khorshuheng 1a36737
Change max age to integer, filter source feature tables, tests for la…
khorshuheng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
421 changes: 421 additions & 0 deletions
421
sdk/python/feast/pyspark/historical_feature_retrieval_job.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,5 @@ flake8 | |
black==19.10b0 | ||
boto3 | ||
moto | ||
pyspark==3.* | ||
pyspark-stubs==3.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
driver_id,event_timestamp,created_timestamp,completed_bookings | ||
8001,2020-08-31T00:00:00.000,2020-08-31T00:00:00.000,200 | ||
8001,2020-09-01T00:00:00.000,2020-09-01T00:00:00.000,300 | ||
8002,2020-09-01T00:00:00.000,2020-09-01T00:00:00.000,600 | ||
8002,2020-09-01T00:00:00.000,2020-09-02T00:00:00.000,500 | ||
8003,2020-09-01T00:00:00.000,2020-09-02T00:00:00.000,700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
id,event_timestamp | ||
1001,2020-09-02T00:00:00.000 | ||
1001,2020-09-03T00:00:00.000 | ||
2001,2020-09-04T00:00:00.000 | ||
2001,2020-09-04T00:00:00.000 | ||
3001,2020-09-04T00:00:00.000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
customer_id,total_bookings,datetime,created_datetime | ||
1001,200,2020-09-02T00:00:00.000,2020-09-02T00:00:00.000 | ||
1001,400,2020-09-04T00:00:00.000,2020-09-02T00:00:00.000 | ||
2001,500,2020-09-03T00:00:00.000,2020-09-01T00:00:00.000 | ||
2001,600,2020-09-03T00:00:00.000,2020-09-02T00:00:00.000 | ||
3001,700,2020-09-03T00:00:00.000,2020-09-03T00:00:00.000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
customer_id,driver_id,event_timestamp | ||
1001,8001,2020-09-02T00:00:00.000 | ||
1001,8002,2020-09-02T00:00:00.000 | ||
1001,8002,2020-09-03T00:00:00.000 | ||
2001,8002,2020-09-03T00:00:00.000 | ||
2001,8002,2020-09-04T00:00:00.000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
customer_id,event_timestamp,created_timestamp,daily_transactions | ||
1001,2020-08-31T00:00:00.000,2020-09-01T00:00:00.000,50.0 | ||
1001,2020-09-01T00:00:00.000,2020-09-01T00:00:00.000,100.0 | ||
2001,2020-09-01T00:00:00.000,2020-08-31T00:00:00.000,80.0 | ||
2001,2020-09-01T00:00:00.000,2020-09-01T00:00:00.000,200.0 | ||
3001,2020-09-01T00:00:00.000,2020-09-01T00:00:00.000,300.0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please add a few more rows, like 5-10. One row is asking for trouble. Same for rest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better to generate thousands to test how multiple partitions can affect result
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, using code to generate data isn't a bad idea, as long as we avoid too much
rand()
without a seed.