![](/img/trans.png)
[英]Google Cloud Platform: accumulate data from Pub/Sub to files in Cloud Storage without Dataflow
[英]Is it possible to read files that are not in Google Cloud Platform from Cloud DataFlow
我正在尝试读取Google Cloud Platform之外的简单CSV。 可能吗。 ?
使用本地CSV文件尝试以下代码段:
PCollection<String> lines = p.apply(TextIO.Read.named("ReadMyFile").from("/tmp/myfile.csv"));
编辑:
基于TextIO.Read.from()的手册,它支持本地文件。
如果您在本地计算机或非GCP服务器(即CSV文件所在的位置)上运行代码,则此代码段将能够将数据加载到DataFlow中。 TextIO.Read.From文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.