[
https://issues.apache.org/jira/browse/AIRFLOW-2715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675820#comment-16675820
]
ASF GitHub Bot commented on AIRFLOW-2715:
-----------------------------------------
kaxil closed pull request #4125: [AIRFLOW-2715] Pick up the region setting
while launching Dataflow templates
URL: https://github.com/apache/incubator-airflow/pull/4125
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/airflow/contrib/hooks/gcp_dataflow_hook.py
b/airflow/contrib/hooks/gcp_dataflow_hook.py
index 4fdb07c74d..f6d7768cf7 100644
--- a/airflow/contrib/hooks/gcp_dataflow_hook.py
+++ b/airflow/contrib/hooks/gcp_dataflow_hook.py
@@ -278,8 +278,9 @@ def _start_template_dataflow(self, name, variables,
parameters,
"parameters": parameters,
"environment": environment}
service = self.get_conn()
- request = service.projects().templates().launch(
+ request = service.projects().locations().templates().launch(
projectId=variables['project'],
+ location=variables['region'],
gcsPath=dataflow_template,
body=body
)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Dataflow template operator dosenot support region parameter
> -----------------------------------------------------------
>
> Key: AIRFLOW-2715
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2715
> Project: Apache Airflow
> Issue Type: Improvement
> Components: operators
> Affects Versions: 1.9.0
> Reporter: Mohammed Tameem
> Priority: Critical
> Fix For: 2.0.0
>
>
> The DataflowTemplateOperator uses dataflow.projects.templates.launch which
> has a region parameter but only supports execution of the dataflow job in the
> us-central1 region. Alternatively there is another api,
> dataflow.projects.locations.templates.launch which supports execution of the
> template in all regional endpoints provided by google cloud.
> It would be great if,
> # The base REST API of this operator could be changed from
> "dataflow.projects.templates.launch" to
> "dataflow.projects.locations.templates.launch"
> # A templated region paramter was included in the operator to run the
> dataflow job in the requested regional endpoint.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)