-
Notifications
You must be signed in to change notification settings - Fork 81
Closed
Description
I tried to load a table containing rows of type INTEGER
and TEXT
but get a type error when trying to select anything from it.
julia> db = SQLite.DB("yfcc100m_dataset.sql")
SQLite.DB("yfcc100m_dataset.sql")
julia> SQLite.tables(db)
(name = ["yfcc100m_dataset"],)
julia> SQLite.columns(db, "yfcc100m_dataset")
(cid = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9 … 13, 14, 15, 16, 17, 18, 19, 20, 21, 22], name = ["photoid", "uid", "unickname", "datetaken", "dateuploaded", "capturedevice", "title", "description", "usertags", "machinetags" … "pageurl", "downloadurl", "licensename", "licenseurl", "serverid", "farmid", "secret", "secretoriginal", "ext", "marker"], type = ["INTEGER", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" … "TEXT", "TEXT", "TEXT", "TEXT", "INTEGER", "INTEGER", "TEXT", "TEXT", "TEXT", "INTEGER"], notnull = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0 … 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dflt_value = [missing, missing, missing, missing, missing, missing, missing, missing, missing, missing … missing, missing, missing, missing, missing, missing, missing, missing, missing, missing], pk = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0 … 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
julia> SQLite.execute(db, "SELECT * FROM yfcc100m_dataset LIMIT 10") |> DataFrame
ERROR: ArgumentError: 'Int32' iterates 'Int32' values, which doesn't satisfy the Tables.jl `AbstractRow` interface
Stacktrace:
[1] invalidtable(#unused#::Int32, #unused#::Int32)
@ Tables C:\Users\Lucaro\.julia\packages\Tables\OWzlh\src\tofromdatavalues.jl:42
[2] iterate
@ C:\Users\Lucaro\.julia\packages\Tables\OWzlh\src\tofromdatavalues.jl:48 [inlined]
[3] buildcolumns
@ C:\Users\Lucaro\.julia\packages\Tables\OWzlh\src\fallbacks.jl:199 [inlined]
[4] columns
@ C:\Users\Lucaro\.julia\packages\Tables\OWzlh\src\fallbacks.jl:262 [inlined]
[5] DataFrame(x::Int32; copycols::Nothing)
@ DataFrames C:\Users\Lucaro\.julia\packages\DataFrames\vuMM8\src\other\tables.jl:58
[6] DataFrame(x::Int32)
@ DataFrames C:\Users\Lucaro\.julia\packages\DataFrames\vuMM8\src\other\tables.jl:49
[7] |>(x::Int32, f::Type{DataFrame})
@ Base .\operators.jl:966
[8] top-level scope
@ REPL[9]:1
This error also occurs when only trying to select from the TEXT
columns. The database in question is this one (warning: large). Is there a work around for this?
Metadata
Metadata
Assignees
Labels
No labels