我想要一个来自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中列出吗?
为了详细说明,我有两个PCollections。
PCollection p1 = pipeline.apply("",
BigQueryIO.read().fromQuery("SELECT * from myTable where userid in " + lst + ));
注意:第一个来自第1行
不知道google dataflow是否不支持简单用例。
宝慕林4294392
临摹微笑
相关分类