简体   繁体   English

是否可以从Cloud DataFlow读取Google Cloud Platform中没有的文件

[英]Is it possible to read files that are not in Google Cloud Platform from Cloud DataFlow

I am trying to read a simple CSV that is outside of the Google Cloud Platform. 我正在尝试读取Google Cloud Platform之外的简单CSV。 Is it possible. 可能吗。 ?

Try this snippet with the local CSV file: 使用本地CSV文件尝试以下代码段:

PCollection<String> lines = p.apply(TextIO.Read.named("ReadMyFile").from("/tmp/myfile.csv"));

constructing-your-pipeline reading-data-into-your-pipeline 将管道读取数据构建到管道中

EDIT: 编辑:

Based on the manual of TextIO.Read.from() it supports local files. 基于TextIO.Read.from()的手册,它支持本地文件。

If you run the code on your local machine or non-GCP server, where the CSV file is, this snippet will be able to load the data into DataFlow. 如果您在本地计算机或非GCP服务器(即CSV文件所在的位置)上运行代码,则此代码段将能够将数据加载到DataFlow中。 TextIO.Read.From documentation TextIO.Read.From文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google Cloud Platform:将Pub / Sub中的数据累积到没有Dataflow的云存储中的文件 - Google Cloud Platform: accumulate data from Pub/Sub to files in Cloud Storage without Dataflow 使用NiFi从Azure到Google Cloud Platform的数据流 - Dataflow from Azure to Google Cloud Platform using NiFi 是否可以在云数据流谷歌云平台中使用 apache 光束执行存储过程 MySQL Azure? - Is possible to execute Stored Procedure MySQL Azure using apache beam in cloud dataflow google cloud platform? Google Cloud Platform Dataflow 未加载或关闭 - Google Cloud Platform Dataflow is not Loading or Down Kafka 到 Google Cloud Platform 数据流摄取 - Kafka to Google Cloud Platform Dataflow ingestion 无法取消Google Cloud Platform上的数据流 - Unable to cancel a dataflow on Google Cloud Platform Google Cloud Platform数据ETL批处理:云功能数据流 - Google Cloud Platform Data ETL Batch Processing: Cloud Function Dataflow 在谷歌云平台中从模板(云数据流)创建作业时分配临时位置时出错 - Error in assigning temporary location while creating a job from template (Cloud dataflow) in google cloud platform 使用 Clud Dataflow 将数据从 Google Cloud Sql 读取到 BigQuery - Read the data from Google Cloud Sql to BigQuery using Clud Dataflow Google Cloud数据流:从具有动态文件名的文件读取 - Google Cloud dataflow : Read from a file with dynamic filename
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM