如何使用Google提供的数据流模板更改默认网络

时间:2021-02-28 15:22:01

I am trying to setup a Dataflow job using the google provided template PubSub to BigQuery. However I am getting this error on start up:

我正在尝试使用谷歌提供的模板PubSub到BigQuery来设置Dataflow作业。但是我在启动时收到此错误:

Message: The resource 'projects/my-project/global/networks/default' was not found

I think the google provided template is hardcoded to use the default network. The error goes away if I create a default network in automatic mode. But we can't have a default network in production.

我认为谷歌提供的模板是硬编码使用默认网络。如果我在自动模式下创建默认网络,则错误消失。但我们不能在生产中使用默认网络。

The document here mentions a network parameter. I tried adding an additional parameter called network from GCP console UI passing in our custom network name. But I am getting this error:

这里的文档提到了一个网络参数。我尝试在GCP控制台UI中添加一个名为network的附加参数,并传入我们的自定义网络名称。但是我收到了这个错误:

The template parameters are invalid.

Is there any way I can tell the Google provided Dataflow template to use my custom network(created in manual mode) instead of the default? What are my options here?

有什么方法可以告诉谷歌提供的数据流模板使用我的自定义网络(在手动模式下创建)而不是默认网络?我有什么选择?

Appreciate all the help!

感谢所有的帮助!

1 个解决方案

#1


1  

This is not currently supported for Dataflow pipelines created from a template. For now, you can either run the template in the default VPC network, or submit a Dataflow pipeline using the Java or Python SDK and specify the network pipeline option.

目前,从模板创建的Dataflow管道不支持此功能。现在,您可以在默认VPC网络中运行模板,也可以使用Java或Python SDK提交Dataflow管道并指定网络管道选项。

#1


1  

This is not currently supported for Dataflow pipelines created from a template. For now, you can either run the template in the default VPC network, or submit a Dataflow pipeline using the Java or Python SDK and specify the network pipeline option.

目前,从模板创建的Dataflow管道不支持此功能。现在,您可以在默认VPC网络中运行模板,也可以使用Java或Python SDK提交Dataflow管道并指定网络管道选项。