Also can i use data type as JSON for these kind of...
# general
h
Also can i use data type as JSON for these kind of values: "address": { "city": "City_71", "state": "State_33", "zipcode": 58184 }
m
You can use JSON index. Also, if this is fixed, you may flatten them out using json extract ingestion transform
h
when you say json index ; you mean data type as JSON?
right now ; iam doing this and its all null
{ "name": "address_city", "dataType": "STRING", "singleValueField": false }, { "name": "address_state", "dataType": "STRING", "singleValueField": false }, { "name": "address_zipcode", "dataType": "STRING", "singleValueField": false } ],
s
@harshini I think what @Mayank means is, you can either 1. Use entire "address" field in your message as a pinot column, with JSON data type, and then while querying use
jsonextractscalar
to get your required fields (https://docs.pinot.apache.org/configuration-reference/functions/jsonextractscalar#usage-examples) 2. Otherwise if you wish to extract these individual fields during ingestion, you could use ingestion transformation configs
JSONPATHSTRING
to map your message fields to pinot columns https://docs.pinot.apache.org/configuration-reference/functions/jsonpathstring#usage-examples