flinkStreamSQL icon indicating copy to clipboard operation
flinkStreamSQL copied to clipboard

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

Open durixu2007 opened this issue 6 years ago • 2 comments

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字段)

durixu2007 avatar Oct 18 '19 07:10 durixu2007

你是es什么版本

chaozwn avatar Nov 18 '19 16:11 chaozwn

sourcedatatype ='dt_nest' 试下

Yangxu1990 avatar Jun 18 '20 01:06 Yangxu1990