Skip to content

最新版本读取kafka数据sink到ES,如果kafka数据是嵌套json,字段值在es中为null #205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
durixu2007 opened this issue Oct 18, 2019 · 2 comments

Comments

@durixu2007
Copy link

1、kafka中的数据格式为:
{
"distinct_id": "16c6a9eeabd205-08b9c3c13daa25-36f661a-269280-16c6a9eeabe1fd",
"lib": {
"$lib": "js",
"$lib_method": "code",
"$lib_version": "1.14.2"
}
}

2、sink到ES中的数据为
{
"_index": "flink2es",
"_type": "mytype_1",
"_id": "16c6a9eeabd205-08b9c3c13daa25-36f661a-269280-16c6a9eeabe1fd",
"_score": 1,
"_source": {
"lib": null,
"distinct_id": "16c6a9eeabd205-08b9c3c13daa25-36f661a-269280-16c6a9eeabe1fd"
}
}
请问嵌套格式的数据为什么是null?(这里指的:lib字段)

@chaozwn
Copy link
Member

chaozwn commented Nov 18, 2019

你是es什么版本

@Yangxu1990
Copy link

sourcedatatype ='dt_nest'
试下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants