(Showing Draft Content)

Connect to ElasticSearchDSL

To create an ElasticSearchDSL data source in Wyn Enterprise, follow these steps.

Note: Wyn Enterprise supports 7.x version of ElasticSearch DSL valid up to 7.17.

  1. On the Resource Portal, navigate to Create (+) > Create Data Source.

  2. Select ElasticSearchDSL in the data source list on the left or in the icon view on the right.

  3. Fill in the database configuration information for the selected data source.

Field Description
Name* The name for the data source that you want to specify.
Hostname* A host name or address.
Port* A port number, the default is 9200.
UserName A user name to connect to the ElasticSearchDSL database.
Password A password of the ElasticSearchDSL user.
Use Configuration String (Advanced) Use this option to connect to the data provider through a connection string. The format of the connection string is: HostName=myHostname;Port=myPort;username=myUsername;Password=myPassword

* Required fields

  1. Click Test Connection to verify the data source connection. If the data source is available, and the credentials filled are correct, you receive a notification on successful connection.

  2. Click Create after the successful connection.

    You can view the added data source in the Categories tab of the Resource Portal.

Salient Points

  1. No schema is generated on previewing the data source.
  2. The dataset cannot be designed by dragging and dropping the tables from the ElasticSearchDSL data source.
  3. The dataset designer only supports the creation of custom SQL tables with native DSL.
    Custom SQL tables with native DSL This is the only way to read the data from the ElasticSearchDSL data source. For more information about DSL queries, please visit this article.

Additional Points

  1. The default host is HTTP URL. If you have an HTTPS URL, you can add the HTTPS in front of your host.
  2. If the cluster status is red, you will face an error.
  3. To use Date type field in the query, you must add a calculated field to convert it to a DateTime column.
  4. When sorting the result using the sort keyword, you must use the [ and ] to quote the original JSON. For example, "sort": [{"_id":"desc"}].
  5. When sorting the result using the order keyword, use the [ and ] to quote the original JSON. For example, "order": [{"_id":"desc"}].
  6. When using the metrics keyword to get the result, you must use [ and ] to quote the original JSON. For example, "metrics": [{"field": "experience"}].


Here are a few limitations of using ElasticSearch DSL data source:

  1. Does not support incremental refresh on a dashboard dataset.
  2. Only the count of elements of the inner bucket table is returned if the element is a bucket table within the element of the bucket table.
  3. When using parameters in the DSL query, you need to guarantee the exact name, type, and count of the column, and must return a successful response when the value is empty or irregular.
  4. The following aggregation functions are not supported in Wyn Enterprise – pipeline, bucket (including Categorize text, Children, Composite, Geo-distance, Geohash grid, Geotile grid, Global, Nested, Parent, and Reverse nested), and metric (including Geo-bounds, Geo-centroid, and Geo-Line).
  5. An empty response or data is returned when a user sends a JSON request. In some cases, a table with no rows and columns is returned, or an error is shown. So, in such cases you must follow the below rules:
    1. Get the table name from query.term node.
    2. Get the table name from query.bool.must.match._index node (first element).
  6. When using user input parameters without a default value, only parameters of types - text or boolean are supported.
  7. If the DSL query filter is empty while using the official client Nest, all the data of the current table is returned.
  8. Does not support the text value to be the same as the parameter name because dataset parameters are replaced in the Elasticsearch DSL query.
  9. When using parameters to achieve the result, there are chances that an empty table is returned. This is because there are no columns in the table and therefore the applied aggregation fails to return the whole columns.
    This is applicable in the case of Matrix Stats, Percentile Ranks, Percentile, Top Hits, Top Metrics, Diversified Sampler, Multi Terms, Sampler, and Significant Text aggregations.
  10. When using the parameter for operator node in the match node and the parameter type is set to user input. Then, you must input 'and' or 'or', or else you will face an error.
  11. If the JSON query fails to parse using the official client Nest, then change 'N/A' to any number.
    "size": 0,
    "aggs": {
        "tag_cardinality": {
            "cardinality": {
                "field": "tags",
                "missing": "N/A"
  12. An error is shown if you include a field in the includes node, which does not exist in the current mapping.