1
votes

I have a streaming pipeline that reads from a PubSub subscription. The pipeline applies 1 hour's fixed windows and after doing some transforms, such as GroupByKey, writes the data to BigQuery.

My problem is that if I stop the job execution, the data of the current window are not written to BigQuery and these are lost since neither are in the subscription nor written in BigQuery.

2
Marcos - do you want to reload your pipeline with a new version of your code? Or do you want to drain out the pipeline and then stop it permanently. - Reuven Lax
Reuven - I want to reload my pipeline with a new version of my code without data loss. - bsmarcosj

2 Answers

2
votes

Marcos,

The update feature is now live in Maven. It requires that you run a new compatible pipeline with the same value for jobName and the --update flag. Note however that if you change your code too much (this usually involves removing or changing GroupByKey or other combining operations) --update will fail, since the service won't know how to associate the old state with the new pipeline.

1
votes

A feature to update a running Dataflow pipeline is in the works. In fact, a version of it is already committed to our GitHub repository and should be a part the next release to Maven Central. Please follow our Release Notes for the specific version information.

The update functionality is triggered via the --update pipeline option. See DataflowPipelineDebugOptions.java for more details.