How to Use requireTail in REST API Datasource for Dynamic API Filtering

Hello Team,

We are using open source BI Helical Insight 6.2.0.952 GA. How can we dynamically pass URL tail/query parameters into a REST API datasource in Helical Insight?

We have a use case where the API requires dynamic filters or query parameters to be appended directly into the API URL during query execution.

Example requirement:

?lat=36.7201600&lng=-4.4203400&date=2019-10-02

We want to know how the requireTail property works in datasource configuration and when the tail part should be provided in the query versus directly in the URL.

SELECT sunrise, sunset
FROM sunrise.?lat=36.7201600&lng=-4.4203400&date=2019-10-02
WHERE sunrise=‘6:12:17 AM’

Thanks,
Snow.

Hello Snow,

The requireTail property is used for dynamic API use cases where additional URL parameters or filters need to be passed during query execution.

Configuration
“requireTail”: true

Behavior
When requireTail = true

The tail/query parameter part must be provided inside the SQL query itself.

Example:

SELECT sunrise, sunset
FROM sunrise.?lat=36.7201600&lng=-4.4203400&date=2019-10-02

In this case:

The datasource URL remains generic
Dynamic filters are passed during query execution
Useful for runtime API filtering and restricted responses

When requireTail = false

The query parameter/tail part should be configured directly in the datasource URL instead of the query.

Example:

“url”: “https://api.sunrise-sunset.org/json?lat=36.7201600&lng=-4.4203400&date=2019-10-02

The SQL query remains simple:

SELECT sunrise, sunset FROM sunrise

This feature is useful for dynamically passing API filters and query-specific parameters at runtime to restrict or customize API responses.
Common use cases include date-based filtering, dynamic search APIs, latitude/longitude filters, and user-driven REST API queries.

Sample config :

{
“name” : “sunrise”,
“url”: “https://api.sunrise-sunset.org/json”,
“method” : “GET”,
“strategy” : “in-memory”,
“requireTail”: true,
“headers” : {},
“queryParams”: {},
“params”: [],
“postBody”: {},
“dataPath”: “results”,
“username” : “”,
“password” : “”,
“connectionTimeOut” : 5000,
“disableSSL”: true
}

For more details of API data source refer velow documentation

Thank You,
Helical Insight Team.