-
Notifications
You must be signed in to change notification settings - Fork 998
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement filter for create dataset api (#215)
* Add conditional filter to dataset creation endpoint * Replace table naming to use uuid suffix * Enable to filter based on job_id * Add filters to create_dataset api
- Loading branch information
1 parent
8a6b2fc
commit f9ab779
Showing
18 changed files
with
504 additions
and
137 deletions.
There are no files selected for viewing
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
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
10 changes: 10 additions & 0 deletions
10
core/src/main/java/feast/core/util/RandomUuidProvider.java
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,10 @@ | ||
package feast.core.util; | ||
|
||
import java.util.UUID; | ||
|
||
public class RandomUuidProvider implements UuidProvider { | ||
@Override | ||
public String getUuid() { | ||
return UUID.randomUUID().toString().replace("-",""); | ||
} | ||
} |
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,5 @@ | ||
package feast.core.util; | ||
|
||
public interface UuidProvider { | ||
String getUuid(); | ||
} |
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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
SELECT | ||
id, | ||
event_timestamp{%- if feature_set.columns | length > 0 %},{%- endif %} | ||
{{ feature_set.columns | join(',') }} | ||
event_timestamp{%- if features | length > 0 %},{%- endif %} | ||
{{ features | join(',') }} | ||
FROM | ||
`{{ feature_set.tableId }}` | ||
`{{ table_id }}` | ||
WHERE event_timestamp >= TIMESTAMP("{{ start_date }}") AND event_timestamp <= TIMESTAMP(DATETIME_ADD("{{ end_date }}", INTERVAL 1 DAY)) | ||
{%- for key, val in number_filters.items() %} AND {{ key }} = {{ val }} {%- endfor %} | ||
{%- for key, val in string_filters.items() %} AND {{ key }} = "{{ val }}" {%- endfor %} | ||
{% if limit is not none -%} | ||
LIMIT {{ limit }} | ||
{%- endif %} |
Oops, something went wrong.