JuliaDB problems


#1

I am unable to use JuliaDB.

The following says it all:
julia> using JuliaDB

julia> path = Pkg.dir(“home”, “js”, “db_docs”, “sql”, “projects”, “basic_sciences”, “juliadb”)
"/home/js/.julia/v0.6/home/js/db_docs/sql/projects/basic_sciences/juliadb"

julia> sampledata = loadfiles(path, indexcols=[“broadfields”])
ERROR: UndefVarError: loadfiles not defined

julia> sampledata = ingest("/home/js/.julia/v0.6/home/js/db_docs/sql/projects/basic_sciences/juliadb/bs.csv", path)
ERROR: UndefVarError: ingest not defined

julia> sampledata = JuliaDB.loadfiles(path, indexcols=[“broadfields”])
ERROR: UndefVarError: loadfiles not defined

It seems to me that my syntax is correct if I read the documentation and api.

What is going on?

Regards
Johann


#2

I think your first line is wrong. This code (from the docs) points to a sample file in the JuliaDB package:

julia> path = Pkg.dir("JuliaDB", "test", "sample")
"/home/travis/.julia/v0.6/JuliaDB/test/sample"

Yours might be:

 path = joinpath("/home", "js", "db_docs", "sql", "projects", "basic_sciences", "juliadb")

On my system:

julia> path = Pkg.dir("JuliaDB", "test", "sample")
"/Users/me/.julia/v0.6/JuliaDB/test/sample"

julia> loadfiles(path)
Metadata for 0 / 6 files can be loaded from cache.
Reading 6 csv files totalling 14.171 KiB...
DTable with 288 rows in 6 chunks:

  │ date        ticker   open     high     low     close   volume
──┼─────────────────────────────────────────────────────────────────
1 │ 2010-01-01  "GOOGL"  626.95   629.51   540.99  626.75  1.78022e8
2 │ 2010-01-01  "GS"     170.05   178.75   154.88  173.08  2.81862e8
3 │ 2010-01-01  "KO"     57.16    57.4301  54.94   57.04   1.92693e8
4 │ 2010-01-01  "XRX"    8.54     9.48     8.91    8.63    3.00838e8
5 │ 2010-02-01  "GOOGL"  534.602  547.5    531.75  533.02  1.03964e8
...

Did you try this example first?


#3

Thanks Cormullion.

There was something wrong with the JuliaDB package installation. I reinstalled it, and now it is working.

And I did not realise that the data for the test/sample was already on my computer…

Regards
Johann