Machhindra
06/02/2021, 8:03 PMKishore G
Machhindra
06/02/2021, 8:05 PMKishore G
Neha Pawar
Machhindra
06/03/2021, 2:28 PMKishore G
Machhindra
06/03/2021, 5:35 PMSELECT * FROM metric_v7 WHERE JSON_MATCH(entityMap, '"$.Db2Bufp"=''BP20''')
Here is the table -
entityMap metric metricTime
{"Db2Bufp":"BP20","Db2Ssid":"DT31"} IDBBWRTI 1622701680000
{"Db2Bufp":"BP3","Db2Ssid":"DT31"} IDBBPGWR 1622701680000
{"Db2Bufp":"BP0","Db2Ssid":"DT31"} IDBBGTPG 1622701680000
Table config -
"tableIndexConfig": {
"jsonIndexColumns": [
"entityMap"
],
"autoGeneratedInvertedIndex": false,
"createInvertedIndexDuringSegmentGeneration": false,
"sortedColumn": [
"metric"
],
"loadMode": "MMAP",
Kishore G
Jackie
06/03/2021, 5:43 PMMachhindra
06/03/2021, 5:44 PMJackie
06/03/2021, 5:44 PMSELECT * FROM metric_v7 WHERE JSON_MATCH(entityMap, 'Db2Bufp=''BP20''')
and see if it works? We recently changed the syntax of the JSON_MATCH which is not included in 0.7.1
Machhindra
06/03/2021, 5:46 PMJackie
06/03/2021, 5:48 PMMachhindra
06/09/2021, 6:22 AMentityMap metric metricTime
{"Db2Bufp":"BP20","Db2Ssid":"DT31"} IDBBWRTI 1622701680000
{"Db2Bufp":"BP3","Db2Ssid":"DT31"} IDBBPGWR 1622701680000
{"Db2Bufp":"BP0","Db2Ssid":"DT31"} IDBBGTPG 1622701680000
Table config -
"tableIndexConfig": {
"jsonIndexColumns": [
"entityMap"
....
{
"columnName": "entityMap",
"transformFunction": "jsonPathString(MetricSource, '$.entityMap', 'null')"
},
The entityMap can be null sometimes. I wish to provide a default value but still continue to ingest the record. I am getting following exception -
java.lang.IllegalStateException: Cannot flatten value node: null
at shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:518) ~[pinot-all-0.7.1-jar-with-dependencies.jar:0.7.
1-afa4b252ab1c424ddd6c859bb305b2aa342b66ed]
at org.apache.pinot.spi.utils.JsonUtils.flatten(JsonUtils.java:246) ~[pinot-all-0.7.1-jar-with-dependencies.jar:0.7.1-afa4b252ab1c
424ddd6c859bb305b2aa342b66ed]
at org.apache.pinot.core.realtime.impl.json.MutableJsonIndex.add(MutableJsonIndex.java:71) ~[pinot-all-0.7.1-jar-with-dependencies
.jar:0.7.1-afa4b252ab1c424ddd6c859bb305b2aa342b66ed]
at org.apache.pinot.core.indexsegment.mutable.MutableSegmentImpl.addNewRow(MutableSegmentImpl.java:631) ~[pinot-all-0.7.1-jar-with
-dependencies.jar:0.7.1-afa4b252ab1c424ddd6c859bb305b2aa342b66ed]
at org.apache.pinot.core.indexsegment.mutable.MutableSegmentImpl.index(MutableSegmentImpl.java:475) ~[pinot-all-0.7.1-jar-with-dep
endencies.jar:0.7.1-afa4b252ab1c424ddd6c859bb305b2aa342b66ed]
at org.apache.pinot.core.data.manager.realtime.LLRealtimeSegmentDataManager.processStreamEvents(LLRealtimeSegmentDataManager.java:
497) [pinot-all-0.7.1-jar-with-dependencies.jar:0.7.1-afa4b252ab1c424ddd6c859bb305b2aa342b66ed]
at org.apache.pinot.core.data.manager.realtime.LLRealtimeSegmentDataManager.
Jackie
06/09/2021, 7:25 AMMachhindra
06/09/2021, 1:11 PM