jsonextractscalar
This section contains reference documentation for the JSONEXTRACTSCALAR function.
Evaluates the 'jsonPath' on jsonField, returns the result as the type 'resultsType', use optional defaultValuefor null or parsing error.
Signature
JSONEXTRACTSCALAR(jsonField, 'jsonPath', 'resultsType', [defaultValue])
Arguments | Description |
---|---|
| An Identifier/Expression contains JSON documents. |
| Follows JsonPath Syntax to read values from JSON documents. |
| One of the Pinot supported data types:
|
'jsonPath'
and`` ``
'results_type'
are literals. Pinot uses single quotes to distinguish them from identifiers.
Usage Examples
The examples in this section are based on the Batch JSON Quick Start. In particular we'll be querying the row WHERE id = 7044874109
:
repo |
---|
{"id":115911530,"name":"LimeVista/Tapes","url":"https://api.github.com/repos/LimeVista/Tapes"} |
The following examples show how to use the JSONEXTRACTSCALAR
function:
id | name |
---|---|
7044874109 | LimeVista/Tapes |
id | name |
---|---|
7044874109 | dummyValue |
Last updated