sql
sql copied to clipboard
(Calcite PPL) `spath` command dynamic columns support
Support dynamic columns use case with spath PPL command.
Example: following spath command will parse doc attribute and extract all the attributes as columns.
source=idx
| spath input=doc
Each item could be any type since JSON attribute could be string/number/array/null
source=idx | spath input=doc
@ykmr1224 if we add change requirement of spath as
- input: mandatory. The field to scan for JSON data.
- output: The destination field that the data will be loaded to. Default: value of path.
- optional, if path exist.
- mandatory, if path does not exist.
- path: The path of the data to load for the object.
- optional if output exist.
- mandatory if output does not exist.
then PPL does not need to support dynamic columns. does it sounds as workaround?