嵌套json 解析后输出的数据为null

Open
#332 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, kafka, sql

Research direction

Reproduce the report using the supplied Kafka source DDL, nested JSON, and sourcedatatype='json' configuration. Start by tracing the Kafka JSON-source handling for the nested info.uid projection; done means the projected uid contains 427083 instead of null.

Written by the indexing model from the issue text.

Description

嵌套json 解析后输出的数据 uid字段一直为null

json日志格式
{
"time":"2020-06-15 19:16:29.243",
"topic":"room_chat",
"appname":"ms",
"info":{
"uid":427083
}
}

kafkasource 建表语句
CREATE TABLE kafka11source (
appname VARCHAR ,
topic VARCHAR ,
info.uid bigint as uid,
time VARCHAR
)
WITH (
type='kafka11',
bootstrapServers='hadoop04:9092',
offsetReset='latest',
topic='room_topic',
groupId='flink_sql,
parallelism='2',
timezone='Asia/Shanghai',
topicIsPattern ='false',
sourcedatatype ='json'
);

Dominant language
Java
Stars
2k
Forks
913
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DTStack/flinkStreamSQL

All issues in DTStack/flinkStreamSQL

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.