Quickstart

The easiest way to evaluate Imply is to install it on a single machine. In this quickstart, we'll set up the platform locally, load some example data, and visualize the data.

Prerequisites

You will need:

  • Java 8 or better
  • Node.js 4.5.x or better
  • Linux, Mac OS X, or other Unix-like OS (Windows is not supported)
  • At least 4GB of RAM

On Mac OS X, you can use Oracle's JDK 8 to install Java and Homebrew to install Node.js.

On Linux, your OS package manager should be able to help for both Java and Node.js. If your Ubuntu- based OS does not have a recent enough version of Java, WebUpd8 offers packages for those OSes. If your Debian, Ubuntu, or Enterprise Linux OS does not have a recent enough version of Node.js, NodeSource offers packages for those OSes.

Please note that the configurations used for this quickstart are tuned to be light on resource usage and are not meant for load testing. Optimal performance on a given dataset or hardware requires some tuning; see our clustering documentation for details.

Getting started

First, download Imply 2.3.4 from imply.io/get-started and unpack the release archive.

tar -xzf imply-2.3.4.tar.gz
cd imply-2.3.4

In this package, you'll find:

  • bin/* - run scripts for included software.
  • conf/* - template configurations for a clustered setup.
  • conf-quickstart/* - configurations for this quickstart.
  • dist/* - all included software.
  • quickstart/* - files useful for this quickstart.

Start up services

Next, you'll need to start up Imply, which includes Druid, Imply Pivot, and ZooKeeper. You can use the included supervise program to start everything with a single command:

bin/supervise -c conf/supervise/quickstart.conf

You should see a log message printed out for each service that starts up. You can view detailed logs for any service by looking in the var/sv/ directory using another terminal.

Later on, if you'd like to stop the services, CTRL-C the supervise program in your terminal. If you want a clean start after stopping the services, remove the var/ directory.

Congratulations, now it's time to load data!

Load data file

We've included a sample of Wikipedia edits from June 27, 2016 to get you started with batch ingestion, located in the file quickstart/wikiticker-2016-06-27-sampled.json. Open the quickstart/wikiticker-index.json ingestion task file to see how Druid can be configured to load this data.

Druid supports an OLAP data model, where you organize your columns into dimensions (attributes you can filter and split on) and metrics (aggregated values; also called "measures"). OLAP data models are designed to allow fast slice-and-dice analysis of data.

Druid supports OLAP data models, but does not require them. You can load your data without OLAP modeling by setting "rollup" to false in your ingestion task, then including all columns you want to index as "dimensions" and leaving your "metricsSpec" empty.

In the Wikipedia dataset, the configured dimensions are:

  • channel
  • cityName
  • comment
  • countryIsoCode
  • countryName
  • isAnonymous
  • isMinor
  • isNew
  • isRobot
  • isUnpatrolled
  • metroCode
  • namespace
  • page
  • regionIsoCode
  • regionName
  • user
  • commentLength
  • deltaBucket
  • flags
  • diffUrl

Time is a dimension too, but it's not included in this list since Druid always treats time as a dimension without explicitly being told.

The metrics in the Wikipedia dataset are:

  • count
  • added
  • deleted
  • delta
  • user_unique

To load this data into Druid, you can submit the ingestion spec that you opened earlier. To do this, run the following command from your Imply directory:

bin/post-index-task --file quickstart/wikiticker-index.json

Which will print something like:

Task started: index_wikiticker_2017-03-02T22:09:45.235Z
Task log:     http://localhost:8090/druid/indexer/v1/task/index_wikiticker_2017-03-02T22:09:45.235Z/log
Task status:  http://localhost:8090/druid/indexer/v1/task/index_wikiticker_2017-03-02T22:09:45.235Z/status
Task index_wikiticker_2017-03-02T22:09:45.235Z still running...
Task index_wikiticker_2017-03-02T22:09:45.235Z still running...
Task finished with status: SUCCESS

You can see more information about ingestion tasks in your cluster by using your overlord console: http://localhost:8090/console.html.

After your ingestion task finishes, the data will be loaded by historical nodes and available for querying within a minute or two. You can monitor the progress of loading your data in the coordinator console, by checking whether there is a datasource "wikiticker" with a blue circle indicating "fully available": http://localhost:8081/#/.

Once the data is fully available, you can immediately query it.

This section showed you how to load data from files, but Druid also supports streaming ingestion. Druid's streaming ingestion can load data with virtually no delay between events occurring and being available for queries.

Querying

Imply contains a number of ways to interact with your data. Start by going to http://localhost:9095.

launcher

You will see the home screen from which you can launch the Imply apps

Pivot

Pivot is a web-based exploratory visualization UI for Druid built on top of Plywood.

home view

With Pivot, you explore a dataset by filtering and splitting it across any dimension. For each filtered split of your data, Pivot can show you the aggregate value of any of your measures. For example, on the wikiticker dataset, you can see the most frequently edited pages by splitting on "page" (drag "Page" to the "Split" bar) and sorting by "Edits" (this is the default sort; you can also click on any column to sort by it).

Pivot offers different visualizations based on how you split your data. If you split on a string column, you will generally see a table. If you split on time, you can see either a timeseries plot or a table.

For example try dragging the Time dimension into the visualization.

cube view

You can fine tune the available dimensions in Pivot by editing the data cube.

SQL

The SQL interface allows you to run DruidSQL queries and download or iterate on the results.

sql

Try running the query:

SELECT page, SUM("count") AS Edits
FROM wikiticker
WHERE TIMESTAMP '2016-06-27 00:00:00' <= __time AND __time < TIMESTAMP '2016-06-28 00:00:00'
GROUP BY page
ORDER BY Edits
DESC LIMIT 5

See the Druid SQL documentation for more details about making SQL queries with Druid.

Next steps

So far, you've loaded a sample data file into an Imply installation running on a single machine. Next, you can:

On-Premise