Alex Turdean
Alex Turdean

Reputation: 69

I want to create a dataflow template from a python script

I found this script and I want to create a dataflow template from it but I don't know how. I also found this command

python -m examples.mymodule \
    --runner DataflowRunner \
    --project YOUR_PROJECT_ID \
    --staging_location gs://YOUR_BUCKET_NAME/staging \
    --temp_location gs://YOUR_BUCKET_NAME/temp \
    --template_location gs://YOUR_BUCKET_NAME/templates/YOUR_TEMPLATE_NAME

for creating and staging a template, but it's really confusing for me.

Upvotes: 2

Views: 891

Answers (2)

First of all you must prepare your script to be used as a template, for this you can follow the link provided by @JayadeepJayaraman [1].

Regarding the python command, it will allow you to create and store your template in the bucket selected in this paramter "--template_location", and the "examples.mymodule" refers to the path of the package.name_script for which you want to create the template.

[1] https://cloud.google.com/dataflow/docs/guides/templates/creating-templates

Upvotes: 2

Jayadeep Jayaraman
Jayadeep Jayaraman

Reputation: 2825

You can take a look at https://cloud.google.com/dataflow/docs/guides/templates/creating-templates on how to create Python Dataflow templates.

Upvotes: 0

Related Questions