flink-1.13.1 sql error

2021-06-19 Thread kcz
sql??
CREATE TABLE user_behavior (
    user_id BIGINT,
    item_id BIGINT,
    category_id BIGINT,
    behavior STRING,
    ts STRING
) WITH (
    'connector' = 'kafka',
    'topic' = 'user_behavior',
    'scan.startup.mode' = 'latest-offset',
    'properties.bootstrap.servers' = 'localhost:9092',
    'format' = 'json'
);


select * from user_behavior;



pom.xml??
flink.version=1.13.1


?????? flink-1.13.1 sql error

2021-06-21 Thread guoyb
??






--  --
??: 
   "user-zh"

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

Re: flink-1.13.1 sql error

2021-06-20 Thread kcz
大佬们 帮看下这个是为什么提示那个错误



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

Re: flink-1.13.1 sql error

2021-06-20 Thread zhuxiaoshang
Json反序列化失败了,像是数据问题
{\n    \"app_time\": \"2021-06-14 10:00:00\",\n    
\"category_id\": 1,\n    \"item_id\": 1,\n    \"user_id\": 
1,\n    \"behavior\": \"pv\"\n}

> 2021年6月20日 下午9:08,kcz <573693...@qq.com.INVALID> 写道:
> 
> 大佬们 帮看下这个是为什么提示那个错误
> 
> 
> 
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/



Re: flink-1.13.1 sql error

2021-06-20 Thread Jingsong Li
你这个报错信息,意思是有个字段,你在DDL里声明是ROW,但是真实数据的这列却不是一个ROW。

你应该排查下是否声明对了,如果在期望中,可以通过ignoreParseErrors来跳过这行

Best,
Jingsong

On Mon, Jun 21, 2021 at 11:46 AM zhuxiaoshang 
wrote:

> Json反序列化失败了,像是数据问题
> {\n    \"app_time\": \"2021-06-14 10:00:00\",\n   
> \"category_id\": 1,\n    \"item_id\": 1,\n   
> \"user_id\": 1,\n    \"behavior\": \"pv\"\n}
>
> > 2021年6月20日 下午9:08,kcz <573693...@qq.com.INVALID> 写道:
> >
> > 大佬们 帮看下这个是为什么提示那个错误
> >
> >
> >
> > --
> > Sent from: http://apache-flink.147419.n8.nabble.com/
>
>

-- 
Best, Jingsong Lee