gamblewin opened a new issue, #9093:
URL: https://github.com/apache/hudi/issues/9093

   **Describe the problem you faced**
   
   I'm trying to use flink table api sqlQuery to read data from hudi table but 
not working, so am i doing it wrong or hudi doesn't support this way to query 
data.
   
   **Code**
   ```java
   sEnv = StreamExecutionEnvironment.getExecutionEnvironment();
   sTableEnv = StreamTableEnvironment.create(sEnv);
   sEnv.setParallelism(1);
   sEnv.enableCheckpointing(3000);
   // create table
   String createTabelSql = "create table dept(\n" +
           "  dept_id BIGINT PRIMARY KEY NOT ENFORCED,\n" +
           "  dept_name varchar(10),\n" +
           "  ts timestamp(3)\n" +
           ")\n" +
           "with (\n" +
           "  'connector' = 'hudi',\n" +
           "  'path' = 'hdfs://localhost:9000/hudi/dept',\n" +
           "  'table.type' = 'MERGE_ON_READ'\n" +
           ")";
   sTableEnv.executeSql(createTabelSql);
   // insert data
   sTableEnv.executeSql("insert into dept values (1, 'a', NOW()), (2, 'b', 
NOW())");
   // query data
   Table table = sTableEnv.sqlQuery("select * from dept");
   DataStream<Row> dataStream = sTableEnv.toDataStream(table);
   // there's nothing to print
   dataStream.print();
   ```
   
   **Environment Description**
   
   * Hudi version : 1.12.0
   
   * Hadoop version : 3.1.3
   
   * Flink version: 1.13.6
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@hudi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to