Querying

Imply includes several different ways you can interact with your data. Your data can be queried though Imply's interface which is accessible at http://localhost:9095.

launcher

Pivot

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

cube 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. 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.

Pivot can be customized through settings, as described on our Pivot configuration page.

SQL

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

sql

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

Druid supports SQL queries through HTTP and JDBC. For example, if you've done the quickstart, you can run SQL queries on the wikiticker dataset:

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.

API access

There are several ways to query your Imply data via APIs:

  • DruidSQL through HTTP, JDBC, or dsql - command line tool included in the Imply distribution.
  • Direct Druid queries - Druid supports a rich family of JSON-based queries. You can make these queries through the Druid Broker by POSTing to http://QUERY_SERVER:8082/druid/v2/.
  • Plywood is a JavaScript library that simplifies building interactive visualizations and applications for large data sets. Plywood powers Pivot and acts as a middle-layer between data visualizations and data stores.
  • PlyQL is an alternative SQL language for Druid. You can also query it using the plyql command line tool included in the Imply distribution. To learn more, see the PlyQL documentation.
  • There are many other libraries for various languages like Python and Ruby. Please see the list of libraries at the Druid site for more.
On-Premise