Skip to content

4GB CSV file turns into 8GB JuliaDB file #137

@MaximilianJHuber

Description

@MaximilianJHuber

This post documents a problem with a very basic use case of JuliaDB.

using JuliaDB
acs = loadtable("psam_pusa.csv", type_detect_rows=200)
save(acs, "test")

yields an 8GB file, although psam_pusa.csv is only 4GB. The infered types are two Strings, many Int64s and many Union{Missing,Int64}s.

acs = loadtable("C:\\Users\\Max\\Desktop\\psam_pusa.csv", 
    colparsers = vcat(String, repeat([Union{Missing,Int64}], 95), String, repeat([Union{Missing,Int64}], 30), String, repeat([Union{Missing,Int64}], 158)))

yields a 2.5GB file.

Does the column type inference work properly? Or is it a storage problem of JuliaDB.
I am on Julia 1.1.0, TextParse 0.9.1+, and JuliaDB 0.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions