Re: Union of multiple datasets vs Join
Posted by
Flavio Pompermaier on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Union-of-multiple-datasets-vs-Join-tp578p878.html
Hi Fabian,
I was trying to use the strategy you suggested with flink 0.8.1 but it seems that the union of the datasets cannot be created programmatically because the union operator gives a name to the generated dataset that is the name of the calling function so that only the first dataset is read. My code looks like:
private static DataSet<Tuple6<...> getSourceDs(ExecutionEnvironment env, final String outputGraph, List<String> tableNames) {
DataSet<Tuple6<...>> ret = null;
for (String tableName : tableNames) {
DataSet<Tuple6<...>> sourceDs = env.createInput(new MyTableInputFormat(tableName))
....
if(ret==null)
ret = sourceDs;
else
ret.union(sourceDs);
}
return ret;
}
Is this a bug or am I'm doing something wrong?
Thanks in advance,
Flavio