You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ROW_NUMBER() OVER({partition_by_join_key_string} ORDER BY {timestamp_desc_string}) AS feast_row_
111
113
FROM {from_expression} t1
112
-
WHERE {timestamp_field} BETWEEN TIMESTAMP('{start_date_str}') AND TIMESTAMP('{end_date_str}')
114
+
WHERE {timestamp_field} BETWEEN TIMESTAMP('{start_date_str}') AND TIMESTAMP('{end_date_str}'){" AND "+date_partition_column+" >= '"+start_date.strftime('%Y-%m-%d')+"' AND "+date_partition_column+" <= '"+end_date.strftime('%Y-%m-%d')+"' "ifdate_partition_column!=""anddate_partition_columnisnotNoneelse''}
113
115
) t2
114
116
WHERE feast_row_ = 1
115
117
"""
@@ -641,8 +643,15 @@ def _cast_data_frame(
641
643
{% endfor %}
642
644
FROM {{ featureview.table_subquery }}
643
645
WHERE {{ featureview.timestamp_field }} <= '{{ featureview.max_event_timestamp }}'
646
+
{% if featureview.date_partition_column != "" and featureview.date_partition_column is not none %}
647
+
AND {{ featureview.date_partition_column }} <= '{{ featureview.max_event_timestamp[:10] }}'
648
+
{% endif %}
649
+
644
650
{% if featureview.ttl == 0 %}{% else %}
645
651
AND {{ featureview.timestamp_field }} >= '{{ featureview.min_event_timestamp }}'
652
+
{% if featureview.date_partition_column != "" and featureview.date_partition_column is not none %}
653
+
AND {{ featureview.date_partition_column }} >= '{{ featureview.min_event_timestamp[:10] }}'
SELECT key1, key2, feature1, feature2, event_header.event_published_datetime_utc AS nested_timestamp, created_timestamp,
126
+
ROW_NUMBER() OVER(PARTITION BY key1, key2 ORDER BY event_header.event_published_datetime_utc DESC, created_timestamp DESC) AS feast_row_
127
+
FROM `offline_store_database_name`.`offline_store_table_name` t1
128
+
WHERE event_header.event_published_datetime_utc BETWEEN TIMESTAMP('2021-01-01 00:00:00.000000') AND TIMESTAMP('2021-01-02 00:00:00.000000') AND effective_date >= '2021-01-01' AND effective_date <= '2021-01-02'
ROW_NUMBER() OVER(PARTITION BY key1, key2 ORDER BY event_published_datetime_utc DESC, created_timestamp DESC) AS feast_row_
244
+
FROM `offline_store_database_name`.`offline_store_table_name` t1
245
+
WHERE event_published_datetime_utc BETWEEN TIMESTAMP('2021-01-01 00:00:00.000000') AND TIMESTAMP('2021-01-02 00:00:00.000000') AND effective_date >= '2021-01-01' AND effective_date <= '2021-01-02'
0 commit comments