开发者社区> 问答> 正文

pyflink1.12 进行多表关联后的结果类型是TableResult,如何转为Table类型

通过sql进行左连接查询,sql语句为:  sql = ''' Insert into print_sink select a.id, a.pf_id, b.symbol_id from a \  left join b on b.day_id = a.biz_date where a.ccy_type = 'AC' and \  a.pf_id = '1030100122' and b.symbol_id = '2030004042' and a.biz_date between '20160701' and '20170307' ''' 

table_result = env.execute_sql(sql)  通过env.execute_sql()执行后的结果是 TableResult , 如何转成Table类型?  或者有哪些其他的方式,可以直接执行表的连接操作,返回结果是Table类型?*来自志愿者整理的flink邮件归档

展开
收起
又出bug了-- 2021-12-02 11:53:55 909 0
1 条回答
写回答
取消 提交回答
  • 使用env.sql_update()执行select语句可以获得Table类型的结果。*来自志愿者整理的FLINK邮件归档

    2021-12-02 14:37:48
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Phoenix Search Index 功能与应用场景介绍 立即下载
Scaling 30 TB’s of Data Lake with Apache HBase and Scala DSL at Production 立即下载
Get rid of traditional ETL, Move to Spark! 立即下载