OmniSci.jl is a pure-Julia client for the OmniSci GPU-accelerated database engine and analysis platform. The goal of this package is to utilize the type-system of Julia to make working with OmniSci seamless.
Installation
using Pkg
Pkg.add("OmniSci")
Setting up an OmniSci Database
The easiest way to get started with OmniSci is to use the provided Docker containers (CPU/GPU):
CPU
docker run \
-d \
--name omnisci \
-p 6274:6274 \
--ipc=host \
-v /home/<username>/omnisci-storage:/omnisci-storage \
omnisci/core-os-cpu
GPU
docker run \
-d \
--name omnisci \
-p 6274:6274 \
--ipc=host \
-v /home/<username>/omnisci-storage:/omnisci-storage \
omnisci/core-os-cuda
For basic OmniSci.jl development, the CPU-only build is sufficient and will allow users to use OmniSci without requiring an NVIDIA GPU. For GPU-accelerated OmniSci, use the Docker container with CUDA support.
Authentication
The first step in using OmniSci.jl is to authenticate against an OmniSci database. Currently, OmniSci.jl only implements the binary transfer protocol from Apache Thrift (i.e. port must equal 6274
or whichever port accepts binary connections); http[s] support to be developed at a later date.
Using the default login credentials for a new OmniSci install:
julia> using OmniSci
julia> conn = connect("localhost", 6274, "admin", "HyperInteractive", "omnisci")
Connected to localhost:6274
Usage
Once authenticated, use the conn
object as the first argument for each method in the package:
julia> tbl = get_tables_meta(conn)
5×6 DataFrame
│ Row │ is_replicated │ is_view │ max_rows │ num_cols │ shard_count │ table_name │
│ │ Bool │ Bool │ Int64 │ Int64 │ Int64 │ String │
├─────┼───────────────┼─────────┼─────────────────────┼──────────┼─────────────┼───────────────────┤
│ 1 │ false │ false │ 4611686018427387904 │ 4 │ 0 │ omnisci_states │
│ 2 │ false │ false │ 4611686018427387904 │ 6 │ 0 │ omnisci_counties │
│ 3 │ false │ false │ 4611686018427387904 │ 64 │ 0 │ omnisci_countries │
│ 4 │ false │ false │ 4611686018427387904 │ 4 │ 0 │ test2 │
│ 5 │ false │ false │ 4611686018427387904 │ 4 │ 0 │ test │