File tree Expand file tree Collapse file tree
storage/connectors/bigquery/src/main/java/feast/storage/connectors/bigquery/writer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ feast-batch-serving:
164164 staging_location : gs://<bucket_name>/feast-staging-location
165165 initial_retry_delay_seconds : 3
166166 total_timeout_seconds : 21600
167+ write_triggering_frequency_seconds : 600
167168 subscriptions :
168169 - name : " *"
169170 project : " *"
@@ -280,6 +281,7 @@ feast-batch-serving:
280281 staging_location : gs://<bucket_name>/feast-staging-location
281282 initial_retry_delay_seconds : 3
282283 total_timeout_seconds : 21600
284+ write_triggering_frequency_seconds : 600
283285 subscriptions :
284286 - name : " *"
285287 project : " *"
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ feast-batch-serving:
137137 staging_location: gs://<bucket_name>/feast-staging-location
138138 initial_retry_delay_seconds: 3
139139 total_timeout_seconds: 21600
140+ write_triggering_frequency_seconds: 600
140141 subscriptions:
141142 - name: "*"
142143 project: "*"
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ feast-batch-serving:
2020 staging_location : gs://<bucket_name>/feast-staging-location
2121 initial_retry_delay_seconds : 3
2222 total_timeout_seconds : 21600
23+ write_triggering_frequency_seconds : 600
2324 subscriptions :
2425 - name : " *"
2526 project : " *"
Original file line number Diff line number Diff line change 1212 staging_location : gs://gcs_bucket/prefix
1313 initial_retry_delay_seconds : 1
1414 total_timeout_seconds : 21600
15+ write_triggering_frequency_seconds : 600
1516 subscriptions :
1617 - name : " *"
1718 project : " *"
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ message Store {
108108 int32 initial_backoff_ms = 3 ;
109109 // Optional. Maximum total number of retries for connecting to Redis. Default to zero retries.
110110 int32 max_retries = 4 ;
111- // Optional. how often flush data to redis
111+ // Optional. How often flush data to redis
112112 int32 flush_frequency_seconds = 5 ;
113113 }
114114
@@ -118,6 +118,7 @@ message Store {
118118 string staging_location = 3 ;
119119 int32 initial_retry_delay_seconds = 4 ;
120120 int32 total_timeout_seconds = 5 ;
121+ // Required. Frequency of running BQ load job and flushing all collected rows to BQ table
121122 int32 write_triggering_frequency_seconds = 6 ;
122123 }
123124
@@ -131,7 +132,7 @@ message Store {
131132 string connection_string = 1 ;
132133 int32 initial_backoff_ms = 2 ;
133134 int32 max_retries = 3 ;
134- // Optional. how often flush data to redis
135+ // Optional. How often flush data to redis
135136 int32 flush_frequency_seconds = 4 ;
136137 }
137138
Original file line number Diff line number Diff line change 1616 */
1717package feast .storage .connectors .bigquery .writer ;
1818
19+ import static com .google .common .base .Preconditions .checkArgument ;
20+
1921import com .google .api .services .bigquery .model .TableSchema ;
2022import com .google .auto .value .AutoValue ;
2123import com .google .cloud .bigquery .*;
@@ -62,6 +64,12 @@ public abstract class BigQueryFeatureSink implements FeatureSink {
6264 * @return {@link BigQueryFeatureSink.Builder}
6365 */
6466 public static FeatureSink fromConfig (BigQueryConfig config ) {
67+ checkArgument (
68+ config .getWriteTriggeringFrequencySeconds () > 0 ,
69+ "Invalid configuration: "
70+ + "write_triggering_frequency_seconds in BigQueryConfig must be positive integer. "
71+ + "Please fix that in your serving configuration." );
72+
6573 return BigQueryFeatureSink .builder ()
6674 .setDatasetId (config .getDatasetId ())
6775 .setProjectId (config .getProjectId ())
You can’t perform that action at this time.
0 commit comments