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(...)
...

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");

Dependencies

  • None