flink 1.11 registerTable 的接口定义如下:
建议使用#createTemporaryView(String, Table)
/**
* Registers a {@link Table} under a unique name in the
TableEnvironment's catalog.
* Registered tables can be referenced in SQL queries.
*
* <p>Temporary objects can shadow permanent ones. If a permanent
object in a given path exists, it will
* be inaccessible in the current session. To make the permanent
object available again one can drop the
* corresponding temporary object.
*
* @param name The name under which the table will be registered.
* @param table The table to register.
* @deprecated use {@link #createTemporaryView(String, Table)}
*/
@Deprecated
void registerTable(String name, Table table);
Jary Zhen <
[hidden email]> 于2020年9月8日周二 下午7:23写道:
> 替换 tableEnv.registerTable("tableTmpA", tableA)
> -> tableEnv.createTemporaryView() api 试试?
>
> me <
[hidden email]> 于2020年9月8日周二 下午5:59写道:
>
>> flink sql中Table类型注册临时表,无法使用的问题?
>> val tableA : Table = …
>> tableEnv.registerTable("tableTmpA", tableA)
>>
>>
>> tableEnv.sqlquery(“select * from tableTmpA”) ==> flink1.11这里是没办法直接使用的
>>
>>
>> 请问谁成功使用过这个特性?
>
>