Edit Queries over External Datasources

Use this form to define a query over an external datasource, e.g., a SQL database. Query results can be then visualized using templates or used in External Query Terms Filter aggregations in visualizations (which in turn create filters when clicked).
Used in conjunction with the Kibi Query Viewer visualization, queries can be parametric and will be executed again on user clicks.

Config

Edit datasource
(optional)
(Empty = always active)
Subject Action Value

Hint: To start type SHOW TABLES Hint: To start type SELECT * FROM pg_catalog.pg_tables Hint: To start type SELECT * WHERE {?s ?p ?o} LIMIT 10
Special variables @doc[_source][property_name]@ will be replaced by values extracted from the documents matching the current selection
Star symbol detected. Try to give an explicit list of variables to return - it is better performance wise and will simplify relational filters configuration.


Special placeholders for username, password and auth_token can be used in values of the headers, parameters and body.
They are respectively: ${username}, ${password}, ${auth_token}


Name Value


Name Value



Optional map of variable names to JSONPath expressions. Variables can be used in:

  • Kibi Data Table visualisation
  • Kibi Query Viewer visualisation
  • External Query Terms aggregations

To know more about JSONPath operators and syntax, see here,
Below some examples of jsonpath expressions that use the following sample data:

[ { "id": 1, "name": "john" }, { "id": 2, "name": "tom" } ]
JSONPath expression Returned data
$[*].name ["john", "tom"]
$[*].id [1,2]
{ "data" : [ { "id": 1, "name": "john" }, { "id": 2, "name": "tom" } ] }
JSONPath expression Returned data
$.data[*].name ["john", "tom"]
$.data[*].id [1,2]
Name Value

Preview

Pick a template to see a HTML preview of the query's results
Edit template
{{holder.jsonPreview}}