Mimir CLI - UBOdin/mimir GitHub Wiki
This page outlines how to interact with mimir on the command line.
Getting Mimir
Install with Homebrew
$> brew tap UBOdin/ubodin
$> brew install mimir
$> mimir --help
Download the Jar
Download the latest self-contained jar:
Run it with
$> java -jar Mimir.jar [options]
Getting started
Grab a CSV data file. For example:
$> curl -O https://github.com/UBOdin/mimir/raw/master/test/data/home.csv
Launch Mimir, and load the data
mimir> LOAD 'home.csv';
Mimir gives you a few ways to explore the data. Pure [SQL](Mimir SQL), or if you have python and matplot lib installed you can get plots.
mimir> SELECT * FROM home LIMIT 10;
mimir> PLOT home;
You can get schema information from the system catalogs
mimir> SELECT * FROM SYS_ATTRS WHERE TABLE_NAME = 'HOME';
There are some errors in the data. For example, there are a bunch of missing values and a bunch of '-999' values. To fix these, Mimir provides cleaning tools called [Lenses](Lenses and Adaptive Schemas). Let's get rid of the errors and missing values:
mimir> CREATE LENS home_cleaned AS SELECT * FROM home
USING MISSING_VALUE(den >= 0, basement >= 0, outside >= 0, office >= 0);
As you do this, Mimir will make some educated guesses about how to fix the data in question. When you look at this data, Mimir warns you when you're looking at data that it had to guess about.
mimir> SELECT * FROM home_cleaned LIMIT 10;
mimir> PLOT home_cleaned;
That's it. For more information see the documentation for
Command Line Options
- --db [db path]: Specify the path to the db to use. (Default: 'debug.db)
- --driver [sqlite|oracle|gprom]: Specify which database driver to use.
- -X[experimental-opt]: Activate an experimental option
- -XINLINE-VG: Enable variable generation inlining (makes queries faster, but only supported in SQLite)
- -XSILENT-TEST: Iterate through, but do not print the results of queries (for performance testing)
- -XNO-BG-CACHE: Disable best guess cache construction.