flinksql连接kafka,数据里面有个字段名字是time

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

flinksql连接kafka,数据里面有个字段名字是time

leiyanrui
使用flinksql连接kafka,kafka的数据格式内部有个字段叫time,我在create
table的时候将time字段加了反单引号还是不行,报错,有什么别的方法吗




--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: flinksql连接kafka,数据里面有个字段名字是time

Benchao Li-2
可以提供一下你使用的Flink版本以及DDL么?

leiyanrui <[hidden email]> 于2020年8月7日周五 上午11:58写道:

> 使用flinksql连接kafka,kafka的数据格式内部有个字段叫time,我在create
> table的时候将time字段加了反单引号还是不行,报错,有什么别的方法吗
>
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/



--

Best,
Benchao Li
Reply | Threaded
Open this post in threaded view
|

Re: flinksql连接kafka,数据里面有个字段名字是time

leiyanrui
CREATE TABLE table1 (
    bg BIGINT,
    user_source BIGINT,
    bossid   BIGINT,
    geekid BIGINT,
    qq_intent BIGINT,
    phone_intent BIGINT,
    wechat_intent BIGINT,
    `time` BIGINT,
    t as to_timestamp(from_unixtime(__ts,'yyyy-MM-dd HH:mm:ss')),
    watermark for t as t - interval '5' second
) WITH (
    ...
);



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: flinksql连接kafka,数据里面有个字段名字是time

Benchao Li-2
使用的是Flink哪个版本呢?以及最好也提供一下异常信息

leiyanrui <[hidden email]> 于2020年8月7日周五 下午2:18写道:

> CREATE TABLE table1 (
>     bg BIGINT,
>     user_source BIGINT,
>     bossid   BIGINT,
>     geekid BIGINT,
>     qq_intent BIGINT,
>     phone_intent BIGINT,
>     wechat_intent BIGINT,
>     `time` BIGINT,
>     t as to_timestamp(from_unixtime(__ts,'yyyy-MM-dd HH:mm:ss')),
>     watermark for t as t - interval '5' second
> ) WITH (
>     ...
> );
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/
>


--

Best,
Benchao Li
Reply | Threaded
Open this post in threaded view
|

Re: flinksql连接kafka,数据里面有个字段名字是time

leiyanrui
Reply | Threaded
Open this post in threaded view
|

Re: flinksql连接kafka,数据里面有个字段名字是time

leiyanrui
Reply | Threaded
Open this post in threaded view
|

Re: flinksql连接kafka,数据里面有个字段名字是time

Benchao Li-2
In reply to this post by leiyanrui
1.10的确是存在一个这样的bug[1],这个已经在1.10.1和1.11.0中修复了,可以尝试下1.10.1或者1.11.1版本。

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

leiyanrui <[hidden email]> 于2020年8月7日周五 下午2:32写道:

> 1.10
> <http://apache-flink.147419.n8.nabble.com/file/t795/error.png>
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/
>


--

Best,
Benchao Li
Reply | Threaded
Open this post in threaded view
|

Re: flinksql连接kafka,数据里面有个字段名字是time

leiyanrui
好的 我去看下 谢谢哈



--
Sent from: http://apache-flink.147419.n8.nabble.com/