CREATE VIEW v_inout_flow AS
SELECT tb.park_code,
tb.park_name,
tb.city_code,
tb.city_name,
ta.status,
ta.event_time
FROM ods_inout_flow AS ta
JOIN dim_park FOR SYSTEM_TIME AS OF ta.proctime AS tb
ON ta.org_code = tb.org_code;
The exception is:
Caused by: org.apache.flink.table.api.SqlParserException: SQL parse failed. Encountered "`dim_park`" at line 3, column 20.
Was expecting one of:
"TABLE" ...
"(" ...
at org.apache.flink.table.planner.calcite.CalciteParser.parse(CalciteParser.java:50)
at org.apache.flink.table.planner.delegation.ParserImpl.parse(ParserImpl.java:64)
at org.apache.flink.table.api.internal.TableEnvironmentImpl.sqlQuery(TableEnvironmentImpl.java:464)
at com.ververica.flink.table.gateway.operation.CreateViewOperation.lambda$execute$0(CreateViewOperation.java:57)
at com.ververica.flink.table.gateway.context.ExecutionContext.wrapClassLoader(ExecutionContext.java:204)
at com.ververica.flink.table.gateway.operation.CreateViewOperation.execute(CreateViewOperation.java:56)
... 45 more
SQL example:
The exception is: