into record
for conversions
Convert value to record.
Signature
> into record {flags}
Input/output types:
input | output |
---|---|
datetime | record |
duration | record |
list<any> | record |
record | record |
Examples
Convert from one row table to record
> [[value]; [false]] | into record
╭───────┬───────╮
│ value │ false │
╰───────┴───────╯
Convert from list of records to record
> [{foo: bar} {baz: quux}] | into record
╭─────┬──────╮
│ foo │ bar │
│ baz │ quux │
╰─────┴──────╯
Convert from list of pairs into record
> [[foo bar] [baz quux]] | into record
╭─────┬──────╮
│ foo │ bar │
│ baz │ quux │
╰─────┴──────╯
convert duration to record (weeks max)
> (-500day - 4hr - 5sec) | into record
╭────────┬────╮
│ week │ 71 │
│ day │ 3 │
│ hour │ 4 │
│ second │ 5 │
│ sign │ - │
╰────────┴────╯
convert record to record
> {a: 1, b: 2} | into record
╭───┬───╮
│ a │ 1 │
│ b │ 2 │
╰───┴───╯
convert date to record
> 2020-04-12T22:10:57+02:00 | into record
╭─────────────┬────────╮
│ year │ 2020 │
│ month │ 4 │
│ day │ 12 │
│ hour │ 22 │
│ minute │ 10 │
│ second │ 57 │
│ millisecond │ 0 │
│ microsecond │ 0 │
│ nanosecond │ 0 │
│ timezone │ +02:00 │
╰─────────────┴────────╯