Ilan Uzan
Dec 14, 2020

Yes, instead of passing the options as command line arguments you can set them in the code.

After the following line:

pipeline_options = PipelineOptions(pipeline_args)

you can add the following 2 lines:

google_cloud_options = pipeline_options.view_as(GoogleCloudOptions)

google_cloud_options.temp_location = 'gs://tests_tmp/tmp'

You have to treat the options as GoogleCloudOptions, as PipelineOptions does not have temp_location attribute.

Here is the relevant part in the doc:

https://beam.apache.org/get-started/wordcount-example/#creating-the-pipeline

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response