【发布时间】:2018-12-02 19:29:23
【问题描述】:
我想要一个来自 Pcollection 的列表值。
PCollection<List<Integer>> lst = bqT2.apply(ParDo.of(new
UserId())); // line 1
List myList = lst.getAll(); // line 2
但是没有“getAll()”函数
我发现了类似的东西
List<String> dummylist = Arrays.asList(dummy);
DoFnTester<String,String> fnTester = DoFnTester.of(new AAA(mapview));
fnTester.setSideInputInGlobalWindow(mapview, csvlist);
//dummylines.apply(ParDo.of(fnTester));
List<String> results = fnTester.processBatch(dummylist);
但我没有找到任何使用“DoFnTester”函数获取列表项的方法。
有没有办法从 PCollection 中列出?
为了详细说明,我有两个 PCollection。
PCollection p1 = pipeline.apply("",
BigQueryIO.read().fromQuery("SELECT * from myTable where userid in " + lst + ));
注意:lst 来自第 1 行
不确定谷歌数据流是否不支持简单的用例。
【问题讨论】:
标签: java google-cloud-platform pipeline dataflow