fx19880617 opened a new pull request #6347:
URL: https://github.com/apache/incubator-pinot/pull/6347
## Description
Adding json extract scalar functions to help extract messages from json
object.
This can help users extract values from json object and flat events during
ingestion time.
Sample ingestion config inside the table config:
```
...
"ingestionConfig": {
"transformConfigs": [
{
"columnName": "created_ts",
"transformFunction": "fromDateTime(created_at,
\"yyyy-MM-dd'T'HH:mm:ssZ\")"
},
{
"columnName": "actor_id",
"transformFunction": "jsonPathLong(actor, '$.id')"
},
{
"columnName": "actor_login",
"transformFunction": "jsonPathString(actor, '$.login')"
},
{
"columnName": "actor_display_login",
"transformFunction": "jsonPathString(actor, '$.display_login')"
},
{
"columnName": "actor_gravatar_id",
"transformFunction": "jsonPathString(actor, '$.gravatar_id')"
},
{
"columnName": "actor_url",
"transformFunction": "jsonPathString(actor, '$.url')"
},
{
"columnName": "actor_avatar_url",
"transformFunction": "jsonPathString(actor, '$.avatar_url')"
},
{
"columnName": "repo_id",
"transformFunction": "jsonPathLong(repo, '$.id')"
},
{
"columnName": "repo_name",
"transformFunction": "jsonPathString(repo, '$.name')"
},
{
"columnName": "repo_url",
"transformFunction": "jsonPathString(repo, '$.url')"
},
{
"columnName": "payload_str",
"transformFunction": "jsonFormat(payload)"
}
]
}
...
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]