Query.jl - Return all columns with @map

question

#1

Hey there,

I recently watched @davidanthoff’s Queryverse tutorial and am giving Query.jl a go. I like the new pipe-able syntax as I’m a heavy user of dplyr. I see the @map macro would be similar to the select and mutate functions in dplyr. I was wondering though how to return all of the columns of a table after the @map macro? It looks like the macro only returns the columns I’ve selected or calculated. Looking at the Linq syntax in the documentation it looks like the @let macro is similar to what I’m looking for so I was curious how to do it with the new syntax.


#2

There is currently no good story for that in Query.jl: you can either pass on all columns with simply _, but of course that is kind of pointless :wink: If you want to just manipulate say one column, you have to explicitly also select all the columns that you want to return, say as @map({_.colA, _.colB, colC = _.colC*2, _.colD}) etc.

I have a complete design mapped out how to do this better, so that we can have more dplyr like functions for these situations. But, it requires julia 0.7 and the native named tuples, so that is why I haven’t added it so far. It will be one of the first new features I’ll add when I port things over to julia 0.7 (I’ve started with that recently).