flatten_single¶
Type of operation: Semistructured
Description¶
Given an input of object or array type, flatten the first level of child elements into ‘_c_NAME_path’ and ‘_c_NAME_value’ columns. The default is to not suggest column types (‘suggesttypes’ = ‘false’.)
Usage¶
flatten_single pathexpression [ , suggesttypes ]
Argument |
Type |
Required |
Multiple |
Constant |
---|---|---|---|---|
pathexpression |
fieldref |
Required |
Only one |
Variable |
suggesttypes |
bool |
Optional |
Only one |
Variable |
Accelerable¶
flatten_single is always accelerable if the input is accelerable. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.
Examples¶
flatten_single foo
Produce new columns that contain the path and values of the top level of keys in foo. Column ‘foo’ will be removed.
flatten_single foo, true
Produce new columns that contain the path and values of the top level of keys in foo. It will also attempt to determine the value’s type, creating a third column, ‘_c_foo_type’, containing the name of the identified type. Column ‘foo’ will be removed.
Aliases¶
flattensingle
(deprecated)