Skip to content

Connecting to TiDB

Connection Steps

Please follow the steps below to connect to the TiDB data source.

  1. Click "New Data Connection" in the upper right corner of the data connection page.

  2. Select the TiDB data source from the data source types.

  3. Fill in the required parameters for the data source connection as prompted.

    Connection Configuration Information Description

    FieldDescription
    NameThe name of the connection. Required and unique within the user.
    Host AddressThe address of the database. If the URL field is filled, the URL takes precedence.
    PortThe port of the database. If the URL field is filled, the URL takes precedence.
    UsernameThe username for the database.
    PasswordThe password for the database.
    DatabaseThe name of the database.
    Max ConnectionsThe maximum number of connections in the connection pool.
    Prefer to use database comment as dataset titleChoose whether to display the table name or the table comment. When enabled, the title is displayed; when disabled, the table comment is displayed.
    URLThe JDBC URL of the database.
    Hierarchical loading of schema and tablesDefault is off. When enabled, schemas and tables are loaded hierarchically. Only schemas are loaded during connection, and you need to click the schema to load the tables under it.
    Query Timeout (seconds)Default is 600. If the data volume is large, you can increase the timeout as appropriate.
    Only show tables under the specified database/schemaWhen this option is selected and the database field is not empty, only tables under the specified database will be displayed.
  4. After filling in the parameters, click the Validate button to get the validation result (this checks the connectivity between HENGSHI SENSE and the configured data connection; you cannot add the connection if validation fails).

  5. After validation passes, click Execute Preset Code to pop up the preset code for this data source, then click the execute button.

  6. Click the Add button to add the TiDB connection.

Please Note

  1. Parameters marked with * are required; others are optional.
  2. TiDB does not support window functions, so it does not support Advanced Calculation. You must enable the Acceleration Engine for support.
  3. When connecting to a data source, you must execute the preset code. Failure to do so will result in some functions being unavailable during data analysis. In addition, when upgrading from a version prior to 4.4 to 4.4, you need to execute the preset code for existing data connections in the system.

Supported TiDB Versions

v2.0, v2.1, v3.0, v3.1, v4.0, v5.0, v5.1, v5.3, v6.0, v6.2, v6.3, v6.4, v6.6, v7.0, v7.2, v7.3, v7.4, v7.6, v8.0, v8.2, v8.3, v8.4

Data Connection Preview Support

Supports regular table and view as well as other tables that can be listed by show tables.

SQL Dataset Support for SQL

All SELECT-related features are supported. The SELECT SQL statement must comply with the TiDB syntax specification.

User Manual for Hengshi Analysis Platform