Pinot Version | 1.0.0 |
---|---|
Code | startreedata/pinot-recipes/update-json-index |
jq
to structure the data in the key:payload
structure that Kafka expects:
Config Key | Description | Type | Default |
---|---|---|---|
maxLevels | Max levels to flatten the json object (array is also counted as one level) | int | -1 (unlimited) |
excludeArray | Whether to exclude array when flattening the object | boolean | false (include array) |
disableCrossArrayUnnest | Whether to not unnest multiple arrays (unique combination of all elements) | boolean | false (calculate unique combination of all elements) |
includePaths | Only include the given paths, e.g. “.a.c[*]” (mutual exclusive with excludePaths). Paths under the included paths will be included, e.g. “.a.b” is configured to be included. | Set<String\> | null (include all paths) |
excludePaths | Exclude the given paths, e.g. “.a.c[*]” (mutual exclusive with includePaths). Paths under the excluded paths will also be excluded, e.g. “.a.b” is configured to be excluded. | Set<String\> | null (include all paths) |
excludeFields | Exclude the given fields, e.g. “b”, “c”, even if it is under the included paths. | Set<String\> | null (include all fields) |
JSON_MATCH
function.
If you use this function with a field that isn’t included in the index, it won’t return any records.=
, <>
, IN
, and NOT IN
state | count(*) |
---|---|
New Hampshire | 34 |
Pennsylvania | 32 |
Kansas | 32 |
New Jersey | 32 |
Maryland | 31 |
Vermont | 30 |
Rhode Island | 30 |
Virginia | 30 |
Ohio | 30 |
Washington | 29 |
count(*) |
---|
3319 |
AddTable
command with the following table config:
age
, any array fields (i.e interests
or friend_ids
), or address.street_address
.
Let’s apply that config
count(*) |
---|
0 |
count(*) |
---|
0 |
count(*) |
---|
308 |