You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The put and filter DSL recognizes the . and sees that array.a is the a slot of array. But all the other verbs do not. :( So there is no field named "array.a".
This is super-weird -- I know. Having Miller accept input and output, in multiple formats, some of which allow nesting (JSON, JSON lines) and some of which don't (CSV, TSV), and trying to do the right thing by default for all combinations, is an exercise in compromise at best.
What's going on here:
In your first example:
There's a field called array which is map-valued with keys a and b.
This is all constructed in memory so array is still map-valued when it gets to put
put sees a map-valued field named array, nothing named array.a
The first mlr, before the pipe, flattens down to CSV as output, so the map-valued field arrays with keys a and b becomes two fields array.a and array.b (use --no-auto-flatten to suppress this)
The second mlr, after the pipe, has CSV input and output and no map-valued field names constructed mid-flight so the field names are array.a and array.b
I would have expected the following two commands to give the same results:
The text was updated successfully, but these errors were encountered: