![](/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.