1

I'm building a sort of wrapper around Flink SQL. I construct a job with a bunch of user-specified SQL statements with StreamTableEnvironment.sqlUpdate. Some are INSERTs, some are CREATEs. I also do some sqlQuerys.

Before I'm calling StreamExecutionEnvironment.execute, I'd like to list all Sources and Sinks that the user created.

Is there a simple / official way to do it, or do I need to go exploring with StreamExecutionEnvironment.getStreamGraph().getJobGraph().getVerticesSortedTopologicallyFromSources()?

Best regards

EDIT: I need the table names, and associated schemas.

4

1 回答 1

2

StreamTableEnvironment没关系,您可以在with中查询表,StreamTableEnvironment.listTables()然后执行StreamTableEnvironment.from(tableName).getSchema()

于 2020-11-10T17:18:34.130 回答