You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by "wind.fly.vip@outlook.com" <wi...@outlook.com> on 2020/05/18 08:43:26 UTC

回复: 回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Hi,
   经过尝试,select时候调用PROCTIME()函数生成proctime字段是可行的,谢谢。
________________________________
发件人: 111 <xi...@163.com>
发送时间: 2020年5月18日 16:07
收件人: user-zh@flink.apache.org <us...@flink.apache.org>
主题: 回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Hi,


试验了下,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成。


比如:
Select …., PROCTIME() AS proctime from xxx;
Select * from xxx t1 left join yyy for system_time as of t1.proctime as t2 on t1.id = t2.id;
这样才行。


Best,
Xinghalo

Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Posted by Leonard Xu <xb...@gmail.com>.
Hi,

如劲松所说,这是 hiveCatalog的一个bug,正常是支持的,1.11中会修复

Best,
Leonard


> 在 2020年5月20日,13:57,wind.fly.vip@outlook.com 写道:
> 
> Hi,
>    版本用的是1.10.0,x.log.yanfa_log是正常的表格式,本人demo中用的是hive catalog:
>   Catalog myCatalog = new HiveCatalog("x", "default",
> 
>        "D:\\conf", "1.1.0");
> 
>  tEnv.registerCatalog("x", myCatalog);
> 
> Best,
> Junbao Zhang
> 
> ________________________________
> 发件人: Leonard Xu <xb...@gmail.com>
> 发送时间: 2020年5月20日 11:51
> 收件人: user-zh <us...@flink.apache.org>
> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
> 
> Hi,wind
> 
> 用你的sql没有报类似的问题,请确认下版本是1.10.x吗?
> 另外不建议表名用 x.log.yanfa_log 包含 “.” 这个关键字符,这和表的全名:catalogName.databaseName.tableName 会冲突,应该在建表时会报catalog x 不存在的问题,没复现proctime field不支持的问题。
> 
> Best,
> Leonard
> 
>> 在 2020年5月20日,11:01,wind.fly.vip@outlook.com 写道:
>> 
>> Hi,
>>   建表语句为:
>>   CREATE TABLE x.log.yanfa_log (
>>   dt TIMESTAMP(3),
>>   conn_id STRING,
>>   sequence STRING,
>>   trace_id STRING,
>>   span_info STRING,
>>   service_id STRING,
>>   msg_id STRING,
>>   servicename STRING,
>>   ret_code STRING,
>>   duration STRING,
>>   req_body MAP<String,String>,
>>   res_body MAP<STRING,STRING>,
>>   extra_info MAP<STRING,STRING>,
>>   proctime AS PROCTIME(),
>>   WATERMARK FOR dt AS dt - INTERVAL '60' SECOND
>> ) WITH (
>>   'connector.type' = 'kafka',
>>   'connector.version' = '0.11',
>>   'connector.topic' = 'x-log-yanfa_log',
>>   'connector.properties.bootstrap.servers' = '*****:9092',
>>   'connector.properties.zookeeper.connect' = '*****:2181',
>>   'connector.startup-mode' = 'latest-offset',
>>   'update-mode' = 'append',
>>   'format.type' = 'json',
>>   'format.fail-on-missing-field' = 'true'
>> );
>> 
>> join sql 可以查看历史记录里面有。
>> 
>> Best,
>> Junbao Zhang
>> ________________________________
>> 发件人: Leonard Xu <xb...@gmail.com>
>> 发送时间: 2020年5月20日 10:50
>> 收件人: user-zh <us...@flink.apache.org>
>> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>> 
>> Hi,
>> 
>> 1.10(1.10.1)版本都是支持建表时用计算列声明proctime列的,temporal table也是支持join 和 left join的,我这边之前1.10 release时验证过[1],可以参考
>> 方便把你们完整的sql 贴出来吗?
>> 
>> 
>> Best,
>> Leonard Xu
>> [1]
>> https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql <https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql>
>> 
>> 
>>> 在 2020年5月19日,09:23,wind.fly.vip@outlook.com 写道:
>>> 
>>> 我就是按照这里面的语法去做的,试验没有成功,能把你试验的create table和query sql语句贴出来吗?谢谢。
>>> ________________________________
>>> 发件人: 祝尚 <17...@163.com>
>>> 发送时间: 2020年5月19日 0:02
>>> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
>>> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>>> 
>>> 可以的吧,jark大佬的例子http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/ <http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/>
>>> 也是这么用的,我也试过sql client和table api里面都没问题
>>> 
>>>> 2020年5月18日 下午4:43,wind.fly.vip@outlook.com 写道:
>>>> 
>>>> Hi,
>>>> 经过尝试,select时候调用PROCTIME()函数生成proctime字段是可行的,谢谢。
>>>> ________________________________
>>>> 发件人: 111 <xi...@163.com>
>>>> 发送时间: 2020年5月18日 16:07
>>>> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
>>>> 主题: 回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>>>> 
>>>> Hi,
>>>> 
>>>> 
>>>> 试验了下,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成。
>>>> 
>>>> 
>>>> 比如:
>>>> Select …., PROCTIME() AS proctime from xxx;
>>>> Select * from xxx t1 left join yyy for system_time as of t1.proctime as t2 on t1.id = t2.id;
>>>> 这样才行。
>>>> 
>>>> 
>>>> Best,
>>>> Xinghalo
>>> 
>> 
> 


Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Posted by Jingsong Li <ji...@gmail.com>.
Hi Junbao, Xinghalo,

抱歉,现在HiveCatalog保存proctime字段是有bug的,[1]。所以就像你说的,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成,这样来绕过。

正在修复中,你也可以打上patch来试试,或者等下1.11.0或1.10.2的发布。

[1]https://issues.apache.org/jira/browse/FLINK-17189

Best,
Jingsong Lee

On Wed, May 20, 2020 at 1:58 PM wind.fly.vip@outlook.com <
wind.fly.vip@outlook.com> wrote:

> Hi,
>     版本用的是1.10.0,x.log.yanfa_log是正常的表格式,本人demo中用的是hive catalog:
>    Catalog myCatalog = new HiveCatalog("x", "default",
>
>         "D:\\conf", "1.1.0");
>
>   tEnv.registerCatalog("x", myCatalog);
>
> Best,
> Junbao Zhang
>
> ________________________________
> 发件人: Leonard Xu <xb...@gmail.com>
> 发送时间: 2020年5月20日 11:51
> 收件人: user-zh <us...@flink.apache.org>
> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR
> SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>
> Hi,wind
>
> 用你的sql没有报类似的问题,请确认下版本是1.10.x吗?
> 另外不建议表名用 x.log.yanfa_log 包含 “.”
> 这个关键字符,这和表的全名:catalogName.databaseName.tableName 会冲突,应该在建表时会报catalog x
> 不存在的问题,没复现proctime field不支持的问题。
>
> Best,
> Leonard
>
> > 在 2020年5月20日,11:01,wind.fly.vip@outlook.com 写道:
> >
> > Hi,
> >    建表语句为:
> >    CREATE TABLE x.log.yanfa_log (
> >    dt TIMESTAMP(3),
> >    conn_id STRING,
> >    sequence STRING,
> >    trace_id STRING,
> >    span_info STRING,
> >    service_id STRING,
> >    msg_id STRING,
> >    servicename STRING,
> >    ret_code STRING,
> >    duration STRING,
> >    req_body MAP<String,String>,
> >    res_body MAP<STRING,STRING>,
> >    extra_info MAP<STRING,STRING>,
> >    proctime AS PROCTIME(),
> >    WATERMARK FOR dt AS dt - INTERVAL '60' SECOND
> > ) WITH (
> >    'connector.type' = 'kafka',
> >    'connector.version' = '0.11',
> >    'connector.topic' = 'x-log-yanfa_log',
> >    'connector.properties.bootstrap.servers' = '*****:9092',
> >    'connector.properties.zookeeper.connect' = '*****:2181',
> >    'connector.startup-mode' = 'latest-offset',
> >    'update-mode' = 'append',
> >    'format.type' = 'json',
> >    'format.fail-on-missing-field' = 'true'
> > );
> >
> > join sql 可以查看历史记录里面有。
> >
> > Best,
> > Junbao Zhang
> > ________________________________
> > 发件人: Leonard Xu <xb...@gmail.com>
> > 发送时间: 2020年5月20日 10:50
> > 收件人: user-zh <us...@flink.apache.org>
> > 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports
> 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support
> 'PROCTIME()'
> >
> > Hi,
> >
> > 1.10(1.10.1)版本都是支持建表时用计算列声明proctime列的,temporal table也是支持join 和 left
> join的,我这边之前1.10 release时验证过[1],可以参考
> > 方便把你们完整的sql 贴出来吗?
> >
> >
> > Best,
> > Leonard Xu
> > [1]
> >
> https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql
> <
> https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql
> >
> >
> >
> >> 在 2020年5月19日,09:23,wind.fly.vip@outlook.com 写道:
> >>
> >> 我就是按照这里面的语法去做的,试验没有成功,能把你试验的create table和query sql语句贴出来吗?谢谢。
> >> ________________________________
> >> 发件人: 祝尚 <17...@163.com>
> >> 发送时间: 2020年5月19日 0:02
> >> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
> >> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports
> 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support
> 'PROCTIME()'
> >>
> >> 可以的吧,jark大佬的例子
> http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/
> <
> http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/
> >
> >> 也是这么用的,我也试过sql client和table api里面都没问题
> >>
> >>> 2020年5月18日 下午4:43,wind.fly.vip@outlook.com 写道:
> >>>
> >>> Hi,
> >>> 经过尝试,select时候调用PROCTIME()函数生成proctime字段是可行的,谢谢。
> >>> ________________________________
> >>> 发件人: 111 <xi...@163.com>
> >>> 发送时间: 2020年5月18日 16:07
> >>> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
> >>> 主题: 回复: flink sql使用维表关联时报Temporal table join currently only supports
> 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support
> 'PROCTIME()'
> >>>
> >>> Hi,
> >>>
> >>>
> >>> 试验了下,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成。
> >>>
> >>>
> >>> 比如:
> >>> Select …., PROCTIME() AS proctime from xxx;
> >>> Select * from xxx t1 left join yyy for system_time as of t1.proctime
> as t2 on t1.id = t2.id;
> >>> 这样才行。
> >>>
> >>>
> >>> Best,
> >>> Xinghalo
> >>
> >
>
>

-- 
Best, Jingsong Lee

回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Posted by "wind.fly.vip@outlook.com" <wi...@outlook.com>.
Hi,
    版本用的是1.10.0,x.log.yanfa_log是正常的表格式,本人demo中用的是hive catalog:
   Catalog myCatalog = new HiveCatalog("x", "default",

        "D:\\conf", "1.1.0");

  tEnv.registerCatalog("x", myCatalog);

Best,
Junbao Zhang

________________________________
发件人: Leonard Xu <xb...@gmail.com>
发送时间: 2020年5月20日 11:51
收件人: user-zh <us...@flink.apache.org>
主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Hi,wind

用你的sql没有报类似的问题,请确认下版本是1.10.x吗?
另外不建议表名用 x.log.yanfa_log 包含 “.” 这个关键字符,这和表的全名:catalogName.databaseName.tableName 会冲突,应该在建表时会报catalog x 不存在的问题,没复现proctime field不支持的问题。

Best,
Leonard

> 在 2020年5月20日,11:01,wind.fly.vip@outlook.com 写道:
>
> Hi,
>    建表语句为:
>    CREATE TABLE x.log.yanfa_log (
>    dt TIMESTAMP(3),
>    conn_id STRING,
>    sequence STRING,
>    trace_id STRING,
>    span_info STRING,
>    service_id STRING,
>    msg_id STRING,
>    servicename STRING,
>    ret_code STRING,
>    duration STRING,
>    req_body MAP<String,String>,
>    res_body MAP<STRING,STRING>,
>    extra_info MAP<STRING,STRING>,
>    proctime AS PROCTIME(),
>    WATERMARK FOR dt AS dt - INTERVAL '60' SECOND
> ) WITH (
>    'connector.type' = 'kafka',
>    'connector.version' = '0.11',
>    'connector.topic' = 'x-log-yanfa_log',
>    'connector.properties.bootstrap.servers' = '*****:9092',
>    'connector.properties.zookeeper.connect' = '*****:2181',
>    'connector.startup-mode' = 'latest-offset',
>    'update-mode' = 'append',
>    'format.type' = 'json',
>    'format.fail-on-missing-field' = 'true'
> );
>
> join sql 可以查看历史记录里面有。
>
> Best,
> Junbao Zhang
> ________________________________
> 发件人: Leonard Xu <xb...@gmail.com>
> 发送时间: 2020年5月20日 10:50
> 收件人: user-zh <us...@flink.apache.org>
> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>
> Hi,
>
> 1.10(1.10.1)版本都是支持建表时用计算列声明proctime列的,temporal table也是支持join 和 left join的,我这边之前1.10 release时验证过[1],可以参考
> 方便把你们完整的sql 贴出来吗?
>
>
> Best,
> Leonard Xu
> [1]
> https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql <https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql>
>
>
>> 在 2020年5月19日,09:23,wind.fly.vip@outlook.com 写道:
>>
>> 我就是按照这里面的语法去做的,试验没有成功,能把你试验的create table和query sql语句贴出来吗?谢谢。
>> ________________________________
>> 发件人: 祝尚 <17...@163.com>
>> 发送时间: 2020年5月19日 0:02
>> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
>> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>>
>> 可以的吧,jark大佬的例子http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/ <http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/>
>> 也是这么用的,我也试过sql client和table api里面都没问题
>>
>>> 2020年5月18日 下午4:43,wind.fly.vip@outlook.com 写道:
>>>
>>> Hi,
>>> 经过尝试,select时候调用PROCTIME()函数生成proctime字段是可行的,谢谢。
>>> ________________________________
>>> 发件人: 111 <xi...@163.com>
>>> 发送时间: 2020年5月18日 16:07
>>> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
>>> 主题: 回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>>>
>>> Hi,
>>>
>>>
>>> 试验了下,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成。
>>>
>>>
>>> 比如:
>>> Select …., PROCTIME() AS proctime from xxx;
>>> Select * from xxx t1 left join yyy for system_time as of t1.proctime as t2 on t1.id = t2.id;
>>> 这样才行。
>>>
>>>
>>> Best,
>>> Xinghalo
>>
>


Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Posted by Leonard Xu <xb...@gmail.com>.
Hi,wind

用你的sql没有报类似的问题,请确认下版本是1.10.x吗?
另外不建议表名用 x.log.yanfa_log 包含 “.” 这个关键字符,这和表的全名:catalogName.databaseName.tableName 会冲突,应该在建表时会报catalog x 不存在的问题,没复现proctime field不支持的问题。

Best,
Leonard

> 在 2020年5月20日,11:01,wind.fly.vip@outlook.com 写道:
> 
> Hi,
>    建表语句为:
>    CREATE TABLE x.log.yanfa_log (
>    dt TIMESTAMP(3),
>    conn_id STRING,
>    sequence STRING,
>    trace_id STRING,
>    span_info STRING,
>    service_id STRING,
>    msg_id STRING,
>    servicename STRING,
>    ret_code STRING,
>    duration STRING,
>    req_body MAP<String,String>,
>    res_body MAP<STRING,STRING>,
>    extra_info MAP<STRING,STRING>,
>    proctime AS PROCTIME(),
>    WATERMARK FOR dt AS dt - INTERVAL '60' SECOND
> ) WITH (
>    'connector.type' = 'kafka',
>    'connector.version' = '0.11',
>    'connector.topic' = 'x-log-yanfa_log',
>    'connector.properties.bootstrap.servers' = '*****:9092',
>    'connector.properties.zookeeper.connect' = '*****:2181',
>    'connector.startup-mode' = 'latest-offset',
>    'update-mode' = 'append',
>    'format.type' = 'json',
>    'format.fail-on-missing-field' = 'true'
> );
> 
> join sql 可以查看历史记录里面有。
> 
> Best,
> Junbao Zhang
> ________________________________
> 发件人: Leonard Xu <xb...@gmail.com>
> 发送时间: 2020年5月20日 10:50
> 收件人: user-zh <us...@flink.apache.org>
> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
> 
> Hi,
> 
> 1.10(1.10.1)版本都是支持建表时用计算列声明proctime列的,temporal table也是支持join 和 left join的,我这边之前1.10 release时验证过[1],可以参考
> 方便把你们完整的sql 贴出来吗?
> 
> 
> Best,
> Leonard Xu
> [1]
> https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql <https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql>
> 
> 
>> 在 2020年5月19日,09:23,wind.fly.vip@outlook.com 写道:
>> 
>> 我就是按照这里面的语法去做的,试验没有成功,能把你试验的create table和query sql语句贴出来吗?谢谢。
>> ________________________________
>> 发件人: 祝尚 <17...@163.com>
>> 发送时间: 2020年5月19日 0:02
>> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
>> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>> 
>> 可以的吧,jark大佬的例子http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/ <http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/>
>> 也是这么用的,我也试过sql client和table api里面都没问题
>> 
>>> 2020年5月18日 下午4:43,wind.fly.vip@outlook.com 写道:
>>> 
>>> Hi,
>>> 经过尝试,select时候调用PROCTIME()函数生成proctime字段是可行的,谢谢。
>>> ________________________________
>>> 发件人: 111 <xi...@163.com>
>>> 发送时间: 2020年5月18日 16:07
>>> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
>>> 主题: 回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>>> 
>>> Hi,
>>> 
>>> 
>>> 试验了下,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成。
>>> 
>>> 
>>> 比如:
>>> Select …., PROCTIME() AS proctime from xxx;
>>> Select * from xxx t1 left join yyy for system_time as of t1.proctime as t2 on t1.id = t2.id;
>>> 这样才行。
>>> 
>>> 
>>> Best,
>>> Xinghalo
>> 
> 


回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Posted by "wind.fly.vip@outlook.com" <wi...@outlook.com>.
Hi,
    建表语句为:
    CREATE TABLE x.log.yanfa_log (
    dt TIMESTAMP(3),
    conn_id STRING,
    sequence STRING,
    trace_id STRING,
    span_info STRING,
    service_id STRING,
    msg_id STRING,
    servicename STRING,
    ret_code STRING,
    duration STRING,
    req_body MAP<String,String>,
    res_body MAP<STRING,STRING>,
    extra_info MAP<STRING,STRING>,
    proctime AS PROCTIME(),
    WATERMARK FOR dt AS dt - INTERVAL '60' SECOND
) WITH (
    'connector.type' = 'kafka',
    'connector.version' = '0.11',
    'connector.topic' = 'x-log-yanfa_log',
    'connector.properties.bootstrap.servers' = '*****:9092',
    'connector.properties.zookeeper.connect' = '*****:2181',
    'connector.startup-mode' = 'latest-offset',
    'update-mode' = 'append',
    'format.type' = 'json',
    'format.fail-on-missing-field' = 'true'
);

join sql 可以查看历史记录里面有。

Best,
Junbao Zhang
________________________________
发件人: Leonard Xu <xb...@gmail.com>
发送时间: 2020年5月20日 10:50
收件人: user-zh <us...@flink.apache.org>
主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Hi,

1.10(1.10.1)版本都是支持建表时用计算列声明proctime列的,temporal table也是支持join 和 left join的,我这边之前1.10 release时验证过[1],可以参考
方便把你们完整的sql 贴出来吗?


Best,
Leonard Xu
[1]
https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql <https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql>


> 在 2020年5月19日,09:23,wind.fly.vip@outlook.com 写道:
>
> 我就是按照这里面的语法去做的,试验没有成功,能把你试验的create table和query sql语句贴出来吗?谢谢。
> ________________________________
> 发件人: 祝尚 <17...@163.com>
> 发送时间: 2020年5月19日 0:02
> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>
> 可以的吧,jark大佬的例子http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/ <http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/>
> 也是这么用的,我也试过sql client和table api里面都没问题
>
>> 2020年5月18日 下午4:43,wind.fly.vip@outlook.com 写道:
>>
>> Hi,
>>  经过尝试,select时候调用PROCTIME()函数生成proctime字段是可行的,谢谢。
>> ________________________________
>> 发件人: 111 <xi...@163.com>
>> 发送时间: 2020年5月18日 16:07
>> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
>> 主题: 回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>>
>> Hi,
>>
>>
>> 试验了下,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成。
>>
>>
>> 比如:
>> Select …., PROCTIME() AS proctime from xxx;
>> Select * from xxx t1 left join yyy for system_time as of t1.proctime as t2 on t1.id = t2.id;
>> 这样才行。
>>
>>
>> Best,
>> Xinghalo
>


Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Posted by Leonard Xu <xb...@gmail.com>.
Hi,

1.10(1.10.1)版本都是支持建表时用计算列声明proctime列的,temporal table也是支持join 和 left join的,我这边之前1.10 release时验证过[1],可以参考
方便把你们完整的sql 贴出来吗?


Best,
Leonard Xu
[1]
https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql <https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/job-sql-1.10/kafka2hbase/KafkaJoinHbaseJoinMysql2Hbase.sql>


> 在 2020年5月19日,09:23,wind.fly.vip@outlook.com 写道:
> 
> 我就是按照这里面的语法去做的,试验没有成功,能把你试验的create table和query sql语句贴出来吗?谢谢。
> ________________________________
> 发件人: 祝尚 <17...@163.com>
> 发送时间: 2020年5月19日 0:02
> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
> 主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
> 
> 可以的吧,jark大佬的例子http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/ <http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/>
> 也是这么用的,我也试过sql client和table api里面都没问题
> 
>> 2020年5月18日 下午4:43,wind.fly.vip@outlook.com 写道:
>> 
>> Hi,
>>  经过尝试,select时候调用PROCTIME()函数生成proctime字段是可行的,谢谢。
>> ________________________________
>> 发件人: 111 <xi...@163.com>
>> 发送时间: 2020年5月18日 16:07
>> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
>> 主题: 回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>> 
>> Hi,
>> 
>> 
>> 试验了下,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成。
>> 
>> 
>> 比如:
>> Select …., PROCTIME() AS proctime from xxx;
>> Select * from xxx t1 left join yyy for system_time as of t1.proctime as t2 on t1.id = t2.id;
>> 这样才行。
>> 
>> 
>> Best,
>> Xinghalo
> 


回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Posted by "wind.fly.vip@outlook.com" <wi...@outlook.com>.
我就是按照这里面的语法去做的,试验没有成功,能把你试验的create table和query sql语句贴出来吗?谢谢。
________________________________
发件人: 祝尚 <17...@163.com>
发送时间: 2020年5月19日 0:02
收件人: user-zh@flink.apache.org <us...@flink.apache.org>
主题: Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

可以的吧,jark大佬的例子http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/ <http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/>
也是这么用的,我也试过sql client和table api里面都没问题

> 2020年5月18日 下午4:43,wind.fly.vip@outlook.com 写道:
>
> Hi,
>   经过尝试,select时候调用PROCTIME()函数生成proctime字段是可行的,谢谢。
> ________________________________
> 发件人: 111 <xi...@163.com>
> 发送时间: 2020年5月18日 16:07
> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
> 主题: 回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
>
> Hi,
>
>
> 试验了下,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成。
>
>
> 比如:
> Select …., PROCTIME() AS proctime from xxx;
> Select * from xxx t1 left join yyy for system_time as of t1.proctime as t2 on t1.id = t2.id;
> 这样才行。
>
>
> Best,
> Xinghalo


Re: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'

Posted by 祝尚 <17...@163.com>.
可以的吧,jark大佬的例子http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/ <http://wuchong.me/blog/2020/02/25/demo-building-real-time-application-with-flink-sql/>
也是这么用的,我也试过sql client和table api里面都没问题

> 2020年5月18日 下午4:43,wind.fly.vip@outlook.com 写道:
> 
> Hi,
>   经过尝试,select时候调用PROCTIME()函数生成proctime字段是可行的,谢谢。
> ________________________________
> 发件人: 111 <xi...@163.com>
> 发送时间: 2020年5月18日 16:07
> 收件人: user-zh@flink.apache.org <us...@flink.apache.org>
> 主题: 回复: flink sql使用维表关联时报Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's proctime field, doesn't support 'PROCTIME()'
> 
> Hi,
> 
> 
> 试验了下,proctime不能在建表时创建。需要在select的时候基于PROCTIME()函数生成。
> 
> 
> 比如:
> Select …., PROCTIME() AS proctime from xxx;
> Select * from xxx t1 left join yyy for system_time as of t1.proctime as t2 on t1.id = t2.id;
> 这样才行。
> 
> 
> Best,
> Xinghalo