Presto/Trino REST API v1 can be used as a data source with SQL-compatible database connector. In this way it is possible to use as a live data source PrestoDB, TrinoDB and Metriql.
Report queries are generated and executed in a real time; this means that your Presto/Trino engine should respond quick enough as execution time is limited by 2 minutes.
Connection String example (NReco.PrestoAdo .NET driver):
|Host||The DNS host name or IP address of the presto/trino coordinator with REST API v1.|
|Port||The web interface port of the presto/trino coordinator (8080 by default).|
|UseSsl||Specifies that the connections made to the presto coordinator and possibly worker nodes should use SSL.|
|Catalog||The catalog to use for interaction with presto/trino.|
|Schema||The schema to connect to in presto/trino ('default' by default).|
|User||The name of the user connecting to presto.|
|Password||The password to use in HTTP basic auth with the presto server.|
|CheckInterval||The amount of time in milliseconds that the client will wait in between checks for new data from presto. The minimum interval is 50ms and the maximum interval is 5000ms (800ms by default).|
|IgnoreSslErrors||Whether to ignore SSL errors produced by connecting to presto over an SSL connection that may be using expired or untrusted certificates (false by default).|
|ClientRequestTimeout||The timeout in seconds for how long to wait for a query to finish (no timeout by default).|
For now it is possible to connect to Trino only if it operates in Presto headers compatiblity mode:
This is temporarily and SeekTable will support Trino headers soon.
SeekTable can connect to Metriql via Presto driver. Sample connection string for Metriql demo server:
However, SeekTable's SQL connector does not aware about Metriql models specifics and "Infer dimensions and measures by dataset" option handles Metriql measures as usual table columns (which may cause syntax errors on Metriql side). How to fix that: