Create a Trino data source to enable Dataphin to write data to Trino.
Permissions
Only users with the following roles can create data sources: super administrators, data source administrators, board architects, project administrators, and custom global roles with the Create Data Source permission.
Procedure
-
In the top menu bar of the Dataphin homepage, choose Management Center > Datasource Management.
-
On the Datasource page, click + New Data Source.
-
On the New Data Source page, find the NoSQL section and select Trino.
If you have recently used Trino, you can also select Trino from the Recently Used section. Alternatively, you can enter Trino in the search box to find it quickly.
-
On the Create Trino Data Source page, configure the parameters for the data source connection.
-
Configure the basic information for the data source.
Parameter
Description
Datasource Name
Enter a name for the data source. The naming conventions are:
-
The name can contain Chinese characters, uppercase letters, lowercase letters, digits, underscores (_), and hyphens (-).
-
The name can be up to 64 characters long.
Datasource Code
After you configure the data source code, you can access Dataphin data source tables in Flink_SQL nodes or through a Dataphin JDBC client by using the
DataSourceCode.TableNameorDataSourceCode.Schema.TableNameformat. To automatically switch data sources based on the task execution environment, use the${DataSourceCode}.tableor${DataSourceCode}.schema.tablevariable format. For more information, see Develop Dataphin data source tables.ImportantThe data source code cannot be modified after it is configured.
You can preview data on the object details page in the asset directory and asset checklist only after the data source code is configured.
In Flink SQL, only MySQL, Hologres, MaxCompute, Oracle, StarRocks, Hive, SelectDB, and GaussDB data warehouse service (DWS) data sources are currently supported.
Data Source Description
Enter a brief description of the data source. The description can be up to 128 characters long.
Datasource Config
Select the type of data source to configure:
-
If your business data source is separated into production and development environments, select Production + Development Data Source.
-
If your business data source is not separated into production and development environments, select Production Data Source.
Tag
You can add tags to categorize data sources. To create a tag, see Manage data source tags.
-
-
Configure the connection parameters between the data source and Dataphin.
If you selected Production + Development Data Source, configuration settings for both environments are displayed. If you selected Production Data Source, only the production data source settings are displayed.
NoteWe recommend that you configure production and development data sources separately to isolate the development environment from production. However, Dataphin also allows you to use the same parameter values for both environments.
Parameter
Description
Trino JDBC URL
Enter the JDBC endpoint. The format is
jdbc:trino://{host}:{port}/catalog/schema. Thecatalog/schemapart is optional.Authentication Type
You can select No Authentication or LDAP. The default value is No Authentication. If you select LDAP, you must also enter the Username and Password to access the Trino instance.
-
-
Select the Default Resource Group. This resource group is used to run tasks related to this data source, such as running SQL statements, performing offline full database migrations, and previewing data.
-
Click Test Connection or click OK to save the settings and create the Trino data source.
Clicking Test Connection tests the connection to the data source. Clicking OK automatically tests the connection for all selected clusters. The data source is created even if the connection test fails.