Create an Oracle data source to enable Dataphin to read business data from or write data to Oracle.
Background information
Oracle is a portable, reliable, adaptable, and powerful relational database. To connect Oracle to Dataphin for data development, create an Oracle data source first.
Required permissions
Only users with the Create Data Source permission in a custom global role, or users with the super administrator, data source administrator, domain architect, or project administrator role, can create data sources.
Procedure
-
In the top navigation bar of the Dataphin homepage, choose Management Center > Datasource Management.
-
On the Datasource page, click +Create Data Source.
-
On the Create Data Source page, select Oracle in the Relational Database section.
If you have recently used Oracle, you can also select it from the Recently Used section, or search for it in the search box.
-
On the Create Oracle 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:
-
The name can contain only Chinese characters, letters, digits, underscores (_), and hyphens (-).
-
The maximum length is 64 characters.
Datasource Code
After configuring the data source code, you can access Dataphin data source tables in Flink_SQL tasks or through the Dataphin JDBC client in the format of
Data source code.Table nameorData source code.schema.Table namefor quick consumption. To automatically switch data sources based on the task execution environment, access the data source in the variable format of${Data source code}.tableor${Data source 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.
Version
Select the version of the Oracle data source. Supported versions: Oracle11g, Oracle12c, Oracle18c, Oracle19c, Oracle21c, and Oracle23c.
Data Source Description
Enter a brief description of the data source, up to 128 characters.
Time Zone
Specifies the time zone for processing time-format data in integration tasks. The default time zone is Asia/Shanghai. Click Modify to select a target time zone. The available 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
Select the data source to configure:
-
If your business data source separates production and development environments, select Production + Development Data Source.
-
If your business data source does not separate production and development environments, select Production Data Source.
Tag
Categorize data sources using 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 selected Production + Development data source, configure connection information for both. If you selected Production data source, configure connection information for the production data source only.
NoteIn most cases, configure the production and development data sources as separate sources to isolate environments. However, Dataphin also supports configuring them as the same data source with identical parameter values.
For Configuration Method, select JDBC URL or Host. The default is JDBC URL.
JDBC URL configuration method
Parameter
Description
JDBC URL
The connection address format is
jdbc:oracle:thin:@host:port:sidorjdbc:oracle:thin:@//host:port/servicename.Schema
The database name under the Oracle instance.
Username, Password
The username and password for logging on to the Oracle instance.
Host configuration method
-
Host configuration method
Parameter
Description
Service Type
You can select Service Name, SID (System Identifier), or Load Balancing.
Server Address
The IP address and port number of the server.
Multiple sets of IP addresses and port numbers are supported only when the service type is Load Balancing. Click Add to add a new row.
dbname
The database name.
-
Parameter configuration
Parameter
Description
Parameter
-
Parameter name: Supports selecting existing parameter names or entering custom parameter names.
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.
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 (optional)
Not required for real-time database migration only. Required for offline integration or real-time computing (Schema information is case-sensitive).
Username, Password
The username and password for logging on to the Oracle instance.
-
NoteWhen the configuration method is Host and the data source is already created, switching to the JDBC URL method causes the system to concatenate the server IP address and port number into a JDBC URL.
-
-
Configure advanced settings for the connection between the data source and Dataphin.
Parameter
Description
Connection Retry Count
If the database connection times out, the system automatically retries until the specified count is reached. If all retries fail, the connection fails.
Note-
The default retry count is 1, and 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 parameters, and Host Configuration method's parameter configuration, the value in the JDBC URL takes precedence.
-
If a parameter exists in both JDBC URL and Advanced Settings parameters, the value in the JDBC URL takes precedence.
-
If a parameter exists in both Advanced Settings parameters and Host Configuration method's parameter configuration, the value in the Advanced Settings parameters takes precedence.
-
-
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.
-
Perform a Test Connection or directly click OK to save and complete the creation of the Oracle data source.
Click Test Connection to verify connectivity between the data source and Dataphin. If you click OK directly, the system automatically tests the connection for all selected clusters, but the data source is still created even if all clusters fail to connect.
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.
-