Skip to content

Commit

Permalink
Update commands to GA (#4658)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcavazos authored Sep 15, 2020
1 parent bf12739 commit 92f83c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
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

0 comments on commit 92f83c8

Please sign in to comment.