Skip to content

Dremio

Dremio is an open source project that allows to explore and analyze data, regardless of its location, size, or structure. It supports several data sources behind it such as Elasticsearch, PostgreSQL, Oracle and others, that we can communicate to by using SQL.

To use the Dremio provider we need include the library:

1
<script src="./CFT-dremio-provider.min.js"></script>
1
2
3
4
5
6
7
8
// define providers
var providers = [{
    name:'Dremio',
    provider:'dremio',
    url:'http://localhost:9047',
    user: 'username',
    password: 'password'
}]

Then, as in with any other provider, use the setProviders() method of ChartFactor to set your data provider definitions:

1
cf.setProviders(providers);

This assumes you have a running instance of Dremio.

It is important to note that Dremio uses a hierarchical naming convention to identify its sources. We must use that same convention to specify source names in the aql:

1
2
3
4
cf.provider('Dremio')
.source('"Source Name"."path.to".source')
.groupby(...)
...

Important

To enable quartiles calculations for box plots in Dremio 3.x, you need to set the planner.enable_decimal_data_type option using Dremio's Admin console. On the top right of the Dremio console, choose Admin to go to the Admin page. Then, on the left pane, within Cluster, select Support. Then, add the planner.enable_decimal_data_type on the Support Key field and click on the "Show" button. Finally, turn the option "on" and click Save.

Supported Aggregations Out-Of-The-Box

SUM

1
    var metric = cf.Metric("amount","sum");

AVG

1
    var metric = cf.Metric("amount","avg");

MIN

1
    var metric = cf.Metric("amount","min");

MAX

1
    var metric = cf.Metric("amount","max");

COUNT DISTINCT

1
    var metric = cf.Metric("my_attribute","unique");

Time Zone Support

As of the writting of this document, Dremio does not support time zone conversions. Therefore, its ChartFactor data provider inherits the same behavior since it pushes down aggregations with time zone conversions to the Dremio engine.

Dependencies

  • None