By creating an Oracle data source, you can enable Dataphin to read business data from Oracle or write data to Oracle. This topic describes how to create an Oracle data source.
Background information
Oracle is a portable, reliable, adaptable, and powerful relational database. If you use Oracle, you need to create an Oracle data source before you can connect it to Dataphin for data development.
Required permissions
Only users who have the Create Data Source permission point in a custom global role or users who have 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 Oracle in the Recently Used section. You can also enter Oracle keywords in the search box to quickly find Oracle.
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 you configure the data source code, you can access Dataphin data source tables in Flink_SQL tasks or using 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, you can 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 that you want to create. The supported versions are Oracle11g, Oracle12c, Oracle18c, Oracle19c, Oracle21c, and Oracle23c.
Data Source Description
Enter a brief description of the data source. The description cannot exceed 128 characters.
Time Zone
The time zone is used to process 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 that you want to configure:
If your business data source distinguishes between production data sources and development data sources, select Production + Development Data Source.
If your business data source does not distinguish between production data sources and development data sources, select Production Data Source.
Tag
You can categorize and tag data sources based on 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 for your data source configuration, you need to configure the connection information for the Production + Development data source. If your data source configuration is Production data source, you only need to configure the connection information for the Production data source.
NoteIn most cases, the production data source and development data source should be configured as different data sources to isolate the development environment from the production environment and reduce the impact of the development data source on the production data source. However, Dataphin also supports configuring them as the same data source with identical parameter values.
For Configuration Method, you can select JDBC URL or Host. The default selection is JDBC URL.
JDBC URL configuration method
Parameter
Description
JDBC URL
The format of the connection address is
jdbc:oracle:thin:@host:port:sidorjdbc:oracle:thin:@//host:port/servicename.Schema
The name of the database under the Oracle instance.
Username, Password
The username and password used to log 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
Enter the IP address and port number of the server.
Only when the service type is selected as Load Balancing, multiple sets of IP addresses and port numbers are supported. Click Add to add a new row.
dbname
Enter 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)
If it is only used for real-time database migration, you do not need to fill in the Schema. If it is used for offline integration or real-time computing, you need to fill in the Schema (Schema information is case-sensitive).
Username, Password
The username and password used to log on to the Oracle instance.
NoteWhen the configuration method is set to Host and the data source creation is completed, to switch to the JDBC URL configuration method, the system will concatenate the server's IP address and port number into a JDBC URL for filling.
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 will automatically retry the connection until the specified number of retries is reached. If the maximum number of retries is reached and the connection is still unsuccessful, the connection fails.
NoteThe 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, and the system will test whether the data source can connect to Dataphin normally. If you directly click OK, the system will automatically test the connection for all selected clusters, but the data source can still be created normally even if all selected 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 only used to test network connectivity with the current data source and are not used for running related tasks later.
The test connection usually takes less than 2 minutes. If it times out, you can click the
icon to view the specific reason and retry.Regardless of whether the test result is Connection Failed, Connection Successful, or Succeeded With Warning, the system will record the generation time 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, you can click the
icon to view the specific failure reason.When the test result is Succeeded With Warning, it means that the application cluster connection is successful but the scheduling cluster connection failed. The current data source cannot be used for data development and integration. You can click the
icon to view the log information.