Rohit Sivakumar
04/27/2022, 1:55 PM_id
a reserved name in Pinot?
Will attach screenshots with both with _id and id as column names in this thread.Rohit Sivakumar
04/27/2022, 1:57 PMKartik Khare
04/27/2022, 2:42 PMRohit Sivakumar
04/27/2022, 3:08 PMid
field.Rohit Sivakumar
04/27/2022, 3:09 PMKartik Khare
04/27/2022, 3:09 PMKartik Khare
04/27/2022, 3:14 PMJSONPATHSTRING(fullDocument, '$._id.$oid')
It seems like id
is not _id
here which seems to be a whole object but oid
field inside _id
object. That should be the difference between two valuesRohit Sivakumar
04/27/2022, 3:58 PM_id
attribute, so it looks like this is being used directly instead of the one described in my transformation.
Is there any way to force the ingestion config to use my transformation when there’s a conflict with the keys in the event source?
Here’s a quick look at how the input to my pinot ingestion looks like.
{
"_id": {
"_id": {
"$oid": "6246a32a8b5a712b500f1eec"
},
"copyingData": true
},
"operationType": "insert",
"documentKey": {
"_id": {
"$oid": "6246a32a8b5a712b500f1eec"
}
},
"fullDocument": {
"_id": {
"$oid": "6246a32a8b5a712b500f1eec"
},
"isDeleted": false,
"createdAt": {
"$date": {
"$numberLong": "1648796458544"
}
},
"updatedAt": {
"$date": {
"$numberLong": "1648796459023"
}
}
}
}
Kartik Khare
04/27/2022, 4:00 PMRohit Sivakumar
04/27/2022, 4:29 PM_id
field.
"_id": {
"_id": {
"$oid": "6246a32a8b5a712b500f1eec"
}
When I add a transformation like the following, I imagine that the _id
field is picked up as is from the event instead of the transformation.
{
"columnName": "_id",
"transformFunction": "JSONPATHSTRING(fullDocument, '$._id.$oid')"
}
This is the only way I can explain what’s going on.
~~
If I set columnName
to id
instead of _id
in the transformation, then the transformation works as expected.