Add an Alibaba Cloud Elastic Search data source

Updated at:

This topic describes how to add and use an Alibaba Cloud Elasticsearch data source in DataV. You can use Elasticsearch with DataV to display data analytics and search results on a large screen.

Prerequisites

You have an Elasticsearch data source ready to be added.

Add an Alibaba Cloud Elastic Search data source

  1. Log on to the DataV console.

  2. On the My Data tab, select Data Source Management and click Add Data.

  3. From the Type list, select Elasticsearch.
  4. Enter the information for the Elasticsearch data source.
    Important DataV requires access to your Alibaba Cloud Elasticsearch service to use it as a data source. This access is granted by a service-linked role.
    In the Add Data dialog box, click Get Instance List. In the dialog box that appears, view the information about the service-linked role.
    • Role Name: AliyunServiceRoleForDataVDataSourceES
    • System Policy: AliyunServiceRolePolicyForDataVDataSourceES
    • Permission Description: Allows the DataV service to use this role to access your Elasticsearch, RDS, and ADS product services.
      Policy details:
      {
          "Statement": [
              {
                  "Effect": "Allow",
                  "Action": [
                      "elasticsearch:ListInstance",
                      "elasticsearch:DescribeInstance",
                      "rds:DescribeDBInstanceAttribute",
                      "adb:DescribeDBClusterAttribute",
                      "gpdb:DescribeDBInstanceNetInfo"
                  ],
                  "Resource": "*"
              },
              {
                  "Action": "ram:DeleteServiceLinkedRole",
                  "Resource": "*",
                  "Effect": "Allow",
                  "Condition": {
                      "StringEquals": {
                          "ram:ServiceName": "datasource-es.datav.aliyuncs.com"
                      }
                  }
              }
          ],
          "Version": "1"
      }

      To delete the AliyunServiceRoleForDataVDataSourceES service-linked role, see Delete a service-linked role.

      For more information about service-linked roles, see Service-linked roles.

    Parameter Description
    Custom Data Source Name The display name for the data source.
    Region The region of the Elastic Search instance. The default region is China (Hangzhou).
    Instance ID The ID of the Elastic Search instance. Click Get Instance List to retrieve a list of your instances. Select an instance from the drop-down list or enter the instance ID directly. Clicking Get Instance List automatically creates a service-linked role that grants DataV access to Elastic Search.

    To find the instance ID, see View the basic information of an instance.

    Password The password that was set when the selected Elastic Search instance was created. Each instance has a different password.

    After you configure the parameters, the system automatically tests the connection.

  5. After you enter the information, click OK to add the data source.

    The new data source automatically appears in the data source list.

Use an Alibaba Cloud Elastic Search data source

  1. Log on to the DataV console.

  2. On the My Visualization page, hover the pointer over the visualization application that you want to edit, and then click Edit.

    Important

    If you do not have any visualization applications on the My Visualization page, create one. For more information, see Create a PC visualization application using a template.

  3. On the canvas editor page, click a widget on the canvas.

    If the canvas does not have any widgets, add one. For more information, see Add an asset.

  4. In the configuration panel for the widget on the right, click the Data tab, and then click Configure Data Source.

  5. On the Set Data Source page, set Data Source Type to Elasticsearch.
  6. From the Select Existing Data Source list, select the configured Elasticsearch data source.
  7. In the index field, enter the query index.
  8. In the Query field, enter the query body. The query body is a JSON object.
  9. Click Preview Data Source Response to view the returned data.