Create a Databricks data source to allow Dataphin to read data from or write data to Databricks.
Permission requirements
Only the super administrator, data source administrator, domain architect, and project administrator roles, or custom global roles with the Create Data Source permission, can create data sources.
Procedure
-
On the Dataphin homepage, choose Management Hub > Datasource Management from the top navigation bar.
-
On the Datasource page, click +Create Data Source.
-
On the Create Data Source page, select Databricks in the Big Data section.
If you have recently used Databricks, you can also select Databricks in the Recently Used section. You can also enter keywords for Databricks in the search box to quickly find it.
-
On the Create Databricks Data Source page, configure the parameters for connecting to the data source.
-
Configure the basic information of the data source.
Parameter
Description
Datasource Name
Enter a name for the data source. The name must meet the following requirements:
-
It can contain only Chinese characters, letters, digits, underscores (_), or hyphens (-).
-
The name can be up to 64 characters in length.
Datasource Code
After you configure the data source code, you can access Dataphin data source tables in Flink_SQL tasks or by using the Dataphin JDBC client in the format of
data source code.table nameordata source code.schema.table namefor quick consumption. If you need to automatically switch data sources based on the task execution environment, access them using the variable format${data source code}.tableor${data source code}.schema.table. For more information, see Dataphin data source table development method.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.
Version
Currently, only version 2.6.40 is supported.
Data Source Description
A brief description of the data source. The description cannot exceed 128 characters.
Time Zone
Time-format data in integration tasks is processed according to the selected time zone. The default time zone is GMT+00:00. Click Modify to select the target time zone. The options are as follows:
-
GMT: GMT-12:00, GMT-11:00, GMT-10:00, GMT-09:30, GMT-09:00, GMT-08:00, GMT-07:00, GMT-06:00, GMT-05:00, GMT-04:00, GMT-03:00, GMT-03:00, GMT-02:30, GMT-02:00, GMT-01:00, GMT+00:00, GMT+01:00, GMT+02:00, GMT+03:00, GMT+03:30, GMT+04:00, GMT+04:30, GMT+05:00, GMT+05:30, GMT+05:45, GMT+06:00, GMT+06:30, GMT+07:00, GMT+08:00, GMT+08:45, GMT+09:00, GMT+09:30, GMT+10:00, GMT+10:30, GMT+11:00, GMT+12:00, GMT+12:45, GMT+13:00, GMT+14:00.
-
Daylight Saving Time: Africa/Cairo, America/Chicago, America/Denver, America/Los_Angeles, America/New_York, America/Sao_Paulo, Asia/Bangkok, Asia/Dubai, Asia/Kolkata, Asia/Shanghai, Asia/Tokyo, Atlantic/Azores, Australia/Sydney, Europe/Berlin, Europe/London, Europe/Moscow, Europe/Paris, Pacific/Auckland, Pacific/Honolulu.
Data Source Configuration
Based on whether your business data source separates production and development environments:
-
If the business data source separates production and development environments, select Production + Development Data Source.
-
If the business data source does not separate production and development environments, select Production Data Source.
Tag
You can categorize data sources by adding tags. For information about creating tags, see Manage data source tags.
-
-
Configure the connection parameters between the data source and Dataphin.
If you select Production + Development data source for your data source configuration, configure the connection information for both environments. If your data source configuration is Production data source, configure the connection information for the production environment only.
NoteWe recommend that you configure separate data sources for production and development to achieve environment isolation and reduce impact on production. However, Dataphin also supports configuring them as the same data source with identical parameter values.
Parameter
Description
Server Address
Enter the IP address and port number of the server. Only one server address is supported.
Parameter Checking (optional)
Click +Parameter Configuration to add a row for entering a Parameter Name and its corresponding Parameter Value. Click the
icon to delete a parameter row.Parameter names and values can contain uppercase and lowercase letters, digits, periods (.), underscores (_), and hyphens (-). They cannot exceed 256 characters in length.
Authentication Mechanism
-
Token-based authentication: Authentication based on personal tokens.
-
M2M-based authentication: Authentication based on Service Principal.
Catalog
Enter the catalog associated with the username.
Schema
Enter the schema associated with the username.
Username, Password
Enter the username and password or credentials of the authentication user. Make sure the user has the required data permissions.
HTTP Path
Enter the HTTP path in the format
/sql/1.0/warehouses/warehouses_id.Connection Retries
If a database connection times out, the system automatically retries until the specified retry count is reached. If the connection still fails, the connection is considered failed.
Note-
The default number of retries is 1. You can configure a value between 0 and 10.
-
The connection retry count applies by default to offline integration tasks and global quality (requires the asset quality function module to be enabled). In offline integration tasks, you can configure task-level retry counts separately.
-
-
-
Select a Default Resource Group, which is used to run tasks related to the current data source, including database SQL, offline database migration, data preview, and more.
-
Run a Connection Test or click OK to save the Databricks data source.
Click Connection Test to verify that the data source can connect to Dataphin. If you click OK directly, the system automatically tests the connection for all selected clusters. Even if all clusters fail the connection test, the data source can still be created.