Thanks…I did checkout the README, and even Tables.rows
, but got this error:
function load_table(conn::OmniSciConnection, table_name::String, tbl_obj)
tbl_to_array = [OmniSci.TStringRow(x) for x in Tables.rows(tbl_obj)]
load_table(conn, table_name, tbl_to_array)
end
MethodError: no method matching iterate(::Tables.ColumnsRow{NamedTuple{(:x1, :x2, :x3, :x4, :x5, :x6, :x7, :x8, :x9, :x10, :x11),Tuple{Array{Union{Missing, Int8},1},Array{Union{Missing, Int16},1},Array{Union{Missing, Int32},1},Array{Union{Missing, Int64},1},Array{Union{Missing, Float32},1},Array{Union{Missing, Float64},1},Array{Union{Missing, Bool},1},Array{String,1},Array{Union{Missing, Date},1},Array{Union{Missing, Time},1},Array{Union{Missing, DateTime},1}}}})
Closest candidates are:
iterate(!Matched::Core.SimpleVector) at essentials.jl:604
iterate(!Matched::Core.SimpleVector, !Matched::Any) at essentials.jl:604
iterate(!Matched::ExponentialBackOff) at error.jl:214
...
Stacktrace:
[1] iterate at ./generator.jl:44 [inlined]
[2] collect(::Base.Generator{Tables.ColumnsRow{NamedTuple{(:x1, :x2, :x3, :x4, :x5, :x6, :x7, :x8, :x9, :x10, :x11),Tuple{Array{Union{Missing, Int8},1},Array{Union{Missing, Int16},1},Array{Union{Missing, Int32},1},Array{Union{Missing, Int64},1},Array{Union{Missing, Float32},1},Array{Union{Missing, Float64},1},Array{Union{Missing, Bool},1},Array{String,1},Array{Union{Missing, Date},1},Array{Union{Missing, Time},1},Array{Union{Missing, DateTime},1}}}},Type{OmniSci.TStringValue}}) at ./array.jl:606
[3] OmniSci.TStringRow(::Tables.ColumnsRow{NamedTuple{(:x1, :x2, :x3, :x4, :x5, :x6, :x7, :x8, :x9, :x10, :x11),Tuple{Array{Union{Missing, Int8},1},Array{Union{Missing, Int16},1},Array{Union{Missing, Int32},1},Array{Union{Missing, Int64},1},Array{Union{Missing, Float32},1},Array{Union{Missing, Float64},1},Array{Union{Missing, Bool},1},Array{String,1},Array{Union{Missing, Date},1},Array{Union{Missing, Time},1},Array{Union{Missing, DateTime},1}}}}) at /home/rzwitch/.julia/dev/OmniSci/src/constructors.jl:240
[4] iterate at ./generator.jl:47 [inlined]
[5] collect(::Base.Generator{Tables.RowIterator{NamedTuple{(:x1, :x2, :x3, :x4, :x5, :x6, :x7, :x8, :x9, :x10, :x11),Tuple{Array{Union{Missing, Int8},1},Array{Union{Missing, Int16},1},Array{Union{Missing, Int32},1},Array{Union{Missing, Int64},1},Array{Union{Missing, Float32},1},Array{Union{Missing, Float64},1},Array{Union{Missing, Bool},1},Array{String,1},Array{Union{Missing, Date},1},Array{Union{Missing, Time},1},Array{Union{Missing, DateTime},1}}}},Type{OmniSci.TStringRow}}) at ./array.jl:606
[6] load_table(::OmniSci.OmniSciConnection, ::String, ::DataFrame) at /home/rzwitch/.julia/dev/OmniSci/src/client.jl:404
[7] top-level scope at /home/rzwitch/.julia/dev/OmniSci/test/runtests.jl:155
[8] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Test/src/Test.jl:1113
[9] top-level scope at /home/rzwitch/.julia/dev/OmniSci/test/runtests.jl:124
Based on your explanation, Tables.rowtable
makes the copy the works with my existing codebase; this error is saying that I don’t have an iterator method defined?