Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions dataflow/flex-templates/streaming_beam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ and is used to run a new Dataflow job.
export TEMPLATE_PATH="gs://$BUCKET/samples/dataflow/templates/streaming-beam.json"

# Build the Flex Template.
gcloud beta dataflow flex-template build $TEMPLATE_PATH \
gcloud dataflow flex-template build $TEMPLATE_PATH \
--image "$TEMPLATE_IMAGE" \
--sdk-language "PYTHON" \
--metadata-file "metadata.json"
Expand All @@ -173,9 +173,11 @@ required by the pipeline.

```sh
# Run the Flex Template.
gcloud beta dataflow flex-template run "streaming-beam-`date +%Y%m%d-%H%M%S`" \
--template-file-gcs-location "$TEMPLATE_PATH" \
--parameters "input_subscription=$SUBSCRIPTION,output_table=$PROJECT:$DATASET.$TABLE"
gcloud dataflow flex-template run "streaming-beam-`date +%Y%m%d-%H%M%S`" \
--template-file-gcs-location "$TEMPLATE_PATH" \
--parameters input_subscription="$SUBSCRIPTION" \
--parameters output_table="$PROJECT:$DATASET.$TABLE" \
--region "$REGION"
```

Check the results in BigQuery by running the following query:
Expand Down
6 changes: 3 additions & 3 deletions dataflow/flex-templates/streaming_beam/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
{
"name": "input_subscription",
"label": "Input PubSub subscription.",
"help_text": "Name of the input PubSub subscription to consume from.",
"helpText": "Name of the input PubSub subscription to consume from.",
"regexes": [
"[a-zA-Z][-_.~+%a-zA-Z0-9]{2,}"
]
},
{
"name": "output_table",
"label": "BigQuery output table name.",
"help_text": "Name of the BigQuery output table name.",
"is_optional": true,
"helpText": "Name of the BigQuery output table name.",
"isOptional": true,
"regexes": [
"[^:]+:[^.]+[.].+"
]
Expand Down