You are analyzing the price of a company's stock. Every 5 seconds, you need to compute a moving average of the past 30 seconds' worth of data. You are reading data from Pub/Sub and using DataFlow to conduct the analysis. How should you set up your windowed pipeline?
A) Use a fixed window with a duration of 5 seconds. Emit results by setting the following trigger: AfterProcessingTime.pastFirstElementInPane() .plusDelayOf(Duration.standardSeconds(30) )
B) Use a fixed window with a duration of 30 seconds. Emit results by setting the following trigger: AfterWatermark.pastEndOfWindow() .plusDelayOf(Duration.standardSeconds(5) )
C) Use a sliding window with a duration of 5 seconds. Emit results by setting the following trigger: AfterProcessingTime.pastFirstElementInPane() .plusDelayOf(Duration.standardSeconds(30) )
D) Use a sliding window with a duration of 30 seconds and a period of 5 seconds. Emit results by setting the following trigger: AfterWatermark.pastEndOfWindow()
Correct Answer:
Verified
Q144: Your company currently runs a large on-premises
Q145: You are developing an application on Google
Q146: You plan to deploy Cloud SQL using
Q147: You have data pipelines running on BigQuery,
Q148: After migrating ETL jobs to run on
Q150: You need to deploy additional dependencies to
Q151: You work for a large bank that
Q152: You are building new real-time data warehouse
Q153: You need to choose a database to
Q154: A shipping company has live package-tracking data
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents