Question about the function "getcolumn" from Tables.jl

Hi, I’m trying to select a column from a table-like data set (it could be a database, a JuliaDB table and so on). In JuliaDB, this could be done using, :var). But I want my package to be able to take in any kind of tables, not just JuliaDB tables.

So I tried the Tables.getcolumn(dat, :var) function from Tables.jl. However, it’s giving me this error message: ERROR: UndefVarError: getcolumn not defined. What did I miss? Thanks.

Can you make a MWE? It works for me.


using DataFrames, CSV, Tables, JuliaDB
df = DataFrame(A = 1:4, B = 5:8)
CSV.write("data/minimal-test.csv", df)
dat = loadtable("data/minimal-test.csv")
Tables.getcolumn(dat, :B)

It would give
ERROR: type IndexedTable has no field B.