arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

jsonextractkey

This section contains reference documentation for the JSONEXTRACTKEY function.

Extracts all matched JSON field keys based on 'jsonPath' into a STRING_ARRAY.

hashtag
Signature

JSONEXTRACTKEY(jsonField, 'jsonPath')

Arguments
Description
circle-exclamation

'jsonPath'` is a literal. Pinot uses single quotes to distinguish them from identifiers.

hashtag
Usage Examples

The examples in this section are based on the . In particular we'll be querying the row WHERE id = 7044874109.

id
repo
keys

jsonField

An Identifier/Expression contains JSON documents.

'jsonPath'

Follows JsonPath Syntaxarrow-up-right to read values from JSON documents.

7044874109

{"id":115911530,"name":"LimeVista/Tapes","url":"https://api.github.com/repos/LimeVista/Tapes"}

$['id'],$['name'],$['url']

Batch JSON Quick Start
select id, repo, JSONEXTRACTKEY(repo, '$.*') AS keys
from githubEvents 
WHERE id = 7044874109