I have been making use of the Arrow.jl library and am currently experiencing difficulty in attempting to obtain a subset of columns from the original (Arrow) table and writing to another, via the function

Naively, I attempted this:

symbols = tblFile  |> |> Tables.columntable

where columnSymbols = Vector{Symbol}()

and other variations like:

symbols = tblFile  |> -> for p in [1: length(columnSymbols)]  columnSymbols[p] end) |> Tables.columntable

since the documentation for gives the example:

table_subset = ctable |>, :A) |> Tables.columntable

How can I progress this?

Also, as an aside, when (trying to) reviewing the source code for “select”:

I found it to be confusing:

# select
struct Select{T, columnaccess, names}

""", columns...) => Tables.Select
    source |> => Tables.Select
Create a lazy wrapper that satisfies the Tables.jl interface and keeps only the columns given by the columns arguments, which can be `String`s, `Symbol`s, or `Integer`s
function select end

select(names::Symbol...) = x->select(x, names...)
select(names::String...) = x->select(x,, names)...)
select(inds::Integer...) = x->select(x,, inds)...)

function select(x::T, names...) where {T}
    colaccess = Tables.columnaccess(T)
    r = colaccess ? Tables.columns(x) : Tables.rows(x)
    return Select{typeof(r), colaccess, names}(r)

which I know to be my lack of knowledge and as someone pursuing Julia with the intention of creating production grade code, using the source as a guide. I point it out purely as my ability to solve my own issue was hindered: I could not fathom where the iteration takes place. How is the struct bound to the function and then how does the piping work?