-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
There are combinations of heterogeneus data where the wrong column types are discovered.
For example:
using JSONTables
using Tables
nonhomogenous = """
[
{"a": 1, "b": 2, "c": 3},
{"b": 4, "c": 8, "d": 5}
]
"""
JSONTables.jsontable(nonhomogenous)
You got:
JSONTables.Table{false, JSON3.Array{JSON3.Object, Base.CodeUnits{UInt8, String}, Vector{UInt64}}}([:a, :b, :c, :d], Dict{Symbol, Type}(:a => Union{Missing, Int64}, :b => Int64, :d => Int64, :c => Int64), JSON3.Object[{
"a": 1,
"b": 2,
"c": 3
}, {
"b": 4,
"c": 8,
"d": 5
}])
d type is detected as Int64 and this throws an error when building a table:
ct = Tables.columntable(jt)
ERROR: MethodError: Cannot `convert` an object of type Missing to an object of type Int64
Metadata
Metadata
Assignees
Labels
No labels