Hi,

I use the following sample code to load data from a database into Flink
DataSet:

DataSet<Row> dbData =
    env.createInput(
      JDBCInputFormat.buildJDBCInputFormat()
                     .setDrivername("org.apache.derby.jdbc.EmbeddedDriver")
                     .setDBUrl("jdbc:derby:memory:persons")
                     .setQuery("select name, age from persons")
                     .setRowTypeInfo(new
RowTypeInfo(BasicTypeInfo.STRING_TYPE_INFO,
BasicTypeInfo.INT_TYPE_INFO))
                     .finish()
    );


But the problem is sometimes there will be tables with many columns so
we need a more straightforward way to introduce the type of the
columns to Flink.

So my question is, is there any way to Flink infer the column type so
no need to announce each column type one by one?

Does Flink provide some way to implement such inputformat?

Reply via email to