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 you need include its library:
| <script src="./CFT-dremio-provider.min.js"></script>
|
| // 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:
| 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:
| 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
| var metric = cf.Metric("amount","sum");
|
AVG
| var metric = cf.Metric("amount","avg");
|
MIN
| var metric = cf.Metric("amount","min");
|
MAX
| var metric = cf.Metric("amount","max");
|
COUNT DISTINCT
| var metric = cf.Metric("my_attribute","unique");
|
PERCENTILES
| var metric = cf.Metric('commission', 'percentiles');
|
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