Skip to content

Commit

Permalink
[hotfix] fix table walkthrough due to removing TableSource & TableSin…
Browse files Browse the repository at this point in the history
…k registration
  • Loading branch information
KurtYoung committed May 16, 2020
1 parent 32b79d1 commit d17a2e0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package ${package};

import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.table.api.internal.TableEnvironmentInternal;
import org.apache.flink.table.api.java.BatchTableEnvironment;
import org.apache.flink.walkthrough.common.table.SpendReportTableSink;
import org.apache.flink.walkthrough.common.table.BoundedTransactionTableSource;
Expand All @@ -32,8 +33,10 @@ public static void main(String[] args) throws Exception {
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
BatchTableEnvironment tEnv = BatchTableEnvironment.create(env);

tEnv.registerTableSource("transactions", new BoundedTransactionTableSource());
tEnv.registerTableSink("spend_report", new SpendReportTableSink());
((TableEnvironmentInternal) tEnv).registerTableSource(
"transactions", new BoundedTransactionTableSource());
((TableEnvironmentInternal) tEnv).registerTableSink(
"spend_report", new SpendReportTableSink());
tEnv.registerFunction("truncateDateToHour", new TruncateDateToHour());

tEnv
Expand Down

0 comments on commit d17a2e0

Please sign in to comment.