...
Output: Builds an Object of the data from the columns Qty
and Amount
.
You can also specify ranges of columns using the tilde (~) operator:
D code |
---|
nest col:Column1~Column20 as:'bigNest' |
Output: Nests the data from columns Column1
and Column20
and all columns displayed in between them in the data grid into the new column bigNest
.
D s | ||
---|---|---|
|
Required? | Data Type |
---|---|
Yes | String (column name) |
...
In the following example, furniture product dimensions are stored in separate columns in cm.
Category | Name | Length_cm | Width_cm | Height_cm |
---|---|---|---|---|
bench | Hooska | 118.11 | 74.93 | 46.34 |
lamp | Tansk | 30.48 | 30.48 | 165.1 |
bookshelf | Brock | 27.94 | 160.02 | 201.93 |
couch | Loafy | 95 | 227 | 83 |
Transform:
Use the the nest
transform transform to bundle the data into a single column.
D code |
---|
nest col:Length~Height Length_cm,Width_cm,Height_cm as:'Dimensions' |
Results:
Category | Name | Length_cm | Width_cm | Height_cm | Dimensions |
---|---|---|---|---|---|
bench | Hooska | 118.11 | 74.93 | 46.34 | {"Length_cm":"118.11","Width_cm":"74.93","Height_cm":"46.34"} |
lamp | Tansk | 30.48 | 30.48 | 165.1 | {"Length_cm":"30.48","Width_cm":"30.48","Height_cm":"165.1"} |
bookshelf | Brock | 27.94 | 160.02 | 201.93 | {"Length_cm":"27.94","Width_cm":"160.02","Height_cm":"201.93"} |
couch | Loafy | 95 | 227 | 83 | {"Length_cm":"95,"Width_cm":"227","Height_cm":"83"} |
D s also | ||
---|---|---|
|