Create a SAP HANA data source to enable Dataphin to read business data from or write data to SAP HANA.
Background information
SAP HANA is a multi-model database that stores data in memory instead of on disk. The column-oriented in-memory database design allows you to run advanced analytics and high-speed transactions in a single system. To connect SAP HANA to Dataphin for data development or to export data from Dataphin to SAP HANA, you must first create a SAP HANA data source.
Permissions
Only custom global roles with the Create Data Source permission and system roles such as super administrator, data source administrator, domain architect, and project administrator can create data sources.
Procedure
-
On the Dataphin homepage, choose Management Center > Datasource Management from the top navigation bar.
-
On the Datasource page, click +Create Data Source.
-
On the Create Data Source page, select SAP HANA in the Relational Database section.
If you have recently used SAP HANA, you can also select SAP HANA in the Recently Used section. You can also enter keywords in the search box to quickly search for SAP HANA.
-
On the Create SAP HANA Data Source page, configure the connection parameters.
-
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 (_), and hyphens (-).
-
It cannot exceed 64 characters in length.
Datasource Code
After you configure the data source code, you can directly access Dataphin data source tables in Flink_SQL tasks or by using the Dataphin JDBC client in the format of
datasource_code.table_nameordatasource_code.schema.table_namefor quick consumption. If you need to automatically switch data sources based on the task execution environment, use the variable format${datasource_code}.tableor${datasource_code}.schema.table. For more information, see Development method for 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
A brief description of the data source. It cannot exceed 128 characters.
Data Source Configuration
Select the data source to be configured:
-
If your business data source distinguishes between production and development data sources, select Production + Development Data Source.
-
If your business data source does not distinguish between production and development data sources, select Production Data Source.
Tag
You can categorize data sources by adding tags. For information about how to create tags, see Manage data source tags.
-
-
Configure the connection parameters between the data source and Dataphin.
If you select Production + Development data source, configure the connection information for both environments. If you select Production data source, configure the connection information for the production environment only.
NoteWe recommend that you configure separate production and development data sources to isolate the two environments. However, Dataphin also supports configuring them as the same data source with identical parameter values.
For Configuration Method, you can choose either JDBC URL or Host. The default is JDBC URL.
JDBC URL configuration method
Parameter
Description
JDBC URL
The format of the connection address is
jdbc:sap://host:port/?databaseName={yourdatabaseName}¤tSchema={yourcurrentSchema}.Username, Password
The username and password used to log on to the SAP HANA database.
Host configuration method
-
Host configuration method
Parameter
Description
Server Address
Enter the IP address and port number of the server.
You can click +Add to add multiple sets of IP addresses and port numbers, and click the
icon to delete extra IP addresses and port numbers. At least one set must be retained.dbname
Enter the database name.
-
Parameter configuration
Parameter
Description
Parameter
-
Parameter name: You can select an existing parameter name or enter a custom parameter name.
Custom parameter names can only contain uppercase and lowercase letters, digits, periods (.), underscores (_), and hyphens (-).
-
Parameter value: When a parameter name is selected, the parameter value is required. It can only contain uppercase and lowercase letters, digits, periods (.), underscores (_), and hyphens (-), and cannot exceed 256 characters in length.
NoteYou can click +Add Parameter to add multiple parameters, and click the
icon to delete extra parameters. You can add up to 30 parameters.Schema
Enter the schema information associated with the username.
Username, Password
The username and password used to log on to the SAP HANA database.
-
NoteIf you switch from the Host configuration method to the JDBC URL method after creating the data source, the system automatically concatenates the server IP address and port number into a JDBC URL.
-
-
Configure advanced settings for the data source.
Parameter
Description
connectTimeout
The connection timeout duration for the database, in milliseconds. The default value is 900,000 (15 minutes).
Note-
If you have a connectTimeout configuration in your JDBC URL, the connectTimeout will be the timeout value configured in the JDBC URL.
-
For data sources created before Dataphin V3.11, the default connectTimeout is
-1, which means no timeout limit.
Connection Retries
If the database connection times out, the system automatically retries until the specified retry count is reached. If the connection still fails after all retries, it is considered failed.
Note-
The default number of retries is 1. You can configure a value between 0 and 10.
-
The connection retry count will be applied 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.
-
NoteRules for duplicate parameters:
-
If a parameter exists in JDBC URL, Advanced Settings, and Host Configuration parameter settings, the value in the JDBC URL takes precedence.
-
If a parameter exists in both JDBC URL and Advanced Settings, the value in the JDBC URL takes precedence.
-
If a parameter exists in both Advanced Settings and Host Configuration parameter settings, the value in Advanced Settings takes precedence.
-
-
Select a Default Resource Group. This resource group is used to run tasks related to the current data source, including database SQL, offline database migration, data preview, and more.
-
Click Test Connection or directly click OK to save and complete the creation of the SAP HANA data source.
When you click Test Connection, the system tests whether the data source can connect to Dataphin. If you directly click OK, the system automatically tests the connection for all selected clusters. The data source can still be created even if all cluster connections fail.
Test Connection tests the connection for the Default Cluster or Registered Scheduling Clusters that have been registered in Dataphin and are in normal use. The Default Cluster is selected by default and cannot be deselected. If there are no resource groups under a Registered Scheduling Cluster, connection testing is not supported. You need to create a resource group first before testing the connection.
-
The selected clusters are used only to test network connectivity and are not used for running tasks.
-
The test connection usually completes within 2 minutes. If it times out, click the
icon to view the reason and retry. -
Regardless of the test result (Connection Failed, Connection Successful, or Succeeded With Warning), the system records the timestamp of the final result.
NoteOnly the test results for the Default Cluster include three connection statuses: Succeeded With Warning, Connection Successful, and Connection Failed. The test results for Registered Scheduling Clusters in Dataphin only include two connection statuses: Connection Successful and Connection Failed.
-
When the test result is Connection Failed, click the
icon to view the failure reason. -
When the test result is Succeeded With Warning, the application cluster connection succeeded but the scheduling cluster connection failed. The data source cannot be used for data development and integration. Click the
icon to view the log information.
-