Create a self-hosted Presto data source

Updated at:

This topic describes how to create a self-hosted Presto data source. This feature is available only in Quick BI Professional and Advanced Editions.

Prerequisites

  • Ensure your network connection is established:

    • If you connect Quick BI to the Presto database over the public network, you must add the IP addresses of Quick BI to the database allowlist. For more information, see Use a security group.

    • If you connect Quick BI to the Presto database over an internal network, you can connect by using one of the following methods:

      • If your Presto database is deployed on an Alibaba Cloud ECS instance, you can connect through an Alibaba Cloud VPC.

      • You can set up a bastion host and use an SSH tunnel to connect to the database.

  • You have created a Presto database.

  • You have the username and password for the Presto database.

Limitations

This feature supports PrestoDB version 0.219 and Trino versions 354 and later.

Procedure

  1. Log on to the Quick BI console.

  2. Add a data source by following the steps shown below.

    1. Navigate to the data source creation page. For more information, see Entry points for creating a data source.

    2. Select the Presto data source.

      image

  3. In the Configure Connection dialog box, set the following parameters.image

    Parameter

    Description

    Connection Mode

    You can select Normal Mode or Cluster Mode.

    Note

    VPC data sources and SSH are not supported in cluster mode.

    Display Name

    The display name for the data source. The name must be unique and cannot contain special characters or leading or trailing spaces.

    Database Address and Port

    The address and port of the Presto database. The address can be an IP address or a domain name.

    catalog

    The Presto catalog that contains the data you want to query.

    Schema

    The name of the schema to connect to.

    Username and Password

    The username and password for the database.

    Database Version

    PrestoDB and Trino are supported.

    VPC Data Source

    Select this option if your database is hosted on an ECS instance in an Alibaba Cloud VPC. If you select VPC Data Source, you must set the following parameters:

    • Purchaser AccessId: The AccessKey ID of the account that purchased the instance.

      For more information, see Create an AccessKey.

      Note

      Ensure that the AccessKey ID has the Read permission for the target instance. Additionally, if the AccessKey ID has the Write permission, the system automatically adds the instance to the allowlist. Otherwise, you must add it manually. For more information, see Create a custom policy.

    • Purchaser AccessKey: The AccessKey Secret of the account that purchased the instance.

      For more information, see Create an AccessKey.

    • Instance ID: The ID of the ECS instance. Log on to the ECS console and find the instance ID on the Instances tab.

      For more information, see View instance information.

    • Region: The region where the ECS instance is located. You can find the region in the upper-left corner of the ECS console.

      For more information, see View instance information.

    Note

    VPC data sources are not supported in cluster mode.

    SSL

    If the target data source is configured with SSL, you can also select SSL as the security protocol for the connection to the target database to secure your data.

    SSH

    Select this option to connect to your data source through an SSH tunnel. If you select SSH, you must set the following parameters:

    • SSH Host: The hostname or IP address for the SSH connection.

    • SSH Username: The username for the SSH connection.

    • SSH Password: The password for the SSH username.

    • SSH Port: The port number for the SSH connection. The default value is 22.

    Note

    SSH is not supported in cluster mode.

    Initialization SQL

    Configure SQL statements that are executed automatically after a connection is established.

    Only SET statements are allowed. Separate multiple statements with semicolons (;).

  4. Click Test Connection to verify the connection to the data source.

    image

  5. After a successful test, click OK to add the data source.

Next steps

After you create the data source, you can create a dataset to analyze your data.