Create a DataHub data source to enable Dataphin to read business data from or write data to DataHub.
Background information
DataHub is Alibaba Cloud's streaming data service that provides publishing, subscription, and distribution capabilities for streaming data, enabling you to build analytics and applications on real-time data streams. You must create a DataHub data source before connecting it to Dataphin for data development. For more information, see DataHub Product Overview.
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, click Management Center > Datasource Management in the top navigation bar.
-
On the Datasource page, click +Create Data Source.
-
On the Create Data Source page, select DataHub in the Message Queue section.
If you have recently used DataHub, you can also select it from the Recently Used section, or search for it by entering keywords in the search box.
-
On the Create DataHub Data Source page, configure the connection parameters.
-
Configure the basic information of the data source.
Parameter
Description
Datasource Name
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 reference tables in the data source in Flink_SQL tasks by using the format
data source code.table nameordata source code.schema.table name. If you need to automatically access the data source in the corresponding environment based on the current environment, use 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.
Data Source Description
A brief description of the data source. It cannot exceed 128 characters.
Data Source Configuration
Select the data source to configure:
-
If the business data source distinguishes between production and development data sources, select Production + Development Data Source.
-
If the business data source does not distinguish between production and development data sources, select Production Data Source.
Tag
Categorize data sources with tags. For information on 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 the connection information for both environments. If you selected Production data source, configure only the production connection information.
NoteWe recommend configuring production and development as separate data sources for environment isolation. However, Dataphin also supports configuring them as the same data source with identical parameter values.
Parameter
Description
Endpoint
The endpoint of DataHub. Select the appropriate endpoint based on your network environment and connection method.
For information on how to obtain the endpoint, see Domain Names.
Project Name
The DataHub project name. You can view the Project Name on the DataHub console page.
Access ID, Access Key
The AccessKey ID and AccessKey Secret of the account to which the DataHub data source belongs.
For information on how to obtain them, see Create an AccessKey pair.
-
-
Select a Default Resource Group, which is used to run tasks related to the current data source, including database SQL, offline database migration, and data preview.
-
Click Test Connection or directly click OK to save and complete the creation of the DataHub data source.
Clicking Test Connection verifies connectivity between the data source and Dataphin. If you click OK directly, the system automatically tests the connection for all selected clusters. The data source is created regardless of whether the connection tests pass.