You can create a Redis data source to write business data from Dataphin to Redis.
Background information
Redis is a high-performance key-value database. It is often used for scenarios such as caching, event publishing or subscribing, and high-speed queues. For more information, see the official Redis website.
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 > Data Source Management in the top menu bar.
On the Data Source page, click +Create Data Source.
On the Create Data Source page, select Redis in the NoSQL section.
Alternatively, if you have recently used Redis, you can select it from the Recently Used section. You can also enter Redis in the search box to find it quickly.
On the Create Redis Data Source page, configure the data source 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 (_), or hyphens (-).
It cannot exceed 64 characters in length.
Datasource Code
After configuring the data source code, reference tables in Flink_SQL nodes using the
datasource_code.table_nameordatasource_code.schema.table_nameformat. To automatically access the data source that corresponds to the current environment, use the${datasource_code}.tableor${datasource_code}.schema.tablevariable format. For more information, see Develop a Dataphin data source table.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 inventory only after the data source code is configured.
In Flink SQL, only MySQL, Hologres, MaxCompute, Oracle, StarRocks, Hive, and SelectDB data sources are supported.
Version
Select 3.x or 5.x.
NoteRedis data sources created before Dataphin V5.3 are version 3.x.
Data Source Description
A brief description of the data source. The description cannot exceed 128 characters in length.
Data Source Configuration
Select the data source to configure:
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
Use tags to categorize and label data sources. For information about how to create tags, see Manage data source tags.
Configure the connection parameters between the data source and Dataphin.
The configuration page that is displayed depends on your selection in the previous step. If you selected Production + Development Data Source, the configuration page for both environments is displayed. If you selected Production Data Source, only the configuration page for the production environment is displayed.
NoteTypically, production and development data sources are configured separately to isolate the environments and prevent the development environment from impacting the production environment. However, Dataphin also lets you configure them as a single data source with identical parameter values.
Parameter
Description
Deployment Mode
Supports two deployment modes: Cluster and Standalone.
Host
The endpoint of the Redis instance. If you use the Alibaba Cloud Redis service, see ApsaraDB for Redis - Step 3: Connect to a Redis instance to obtain the endpoint.
Port
The port of the Redis instance.
Password
The password used to access the Redis instance.
Select a Default Resource Group. This resource group is used to run tasks related to this data source, such as SQL queries, full offline database migrations, and data previews.
Click Test Connection to verify the connection, or click OK to save the configuration and create the Redis data source.
Clicking Test Connection verifies that Dataphin can connect to the data source. If you click OK directly, the system automatically tests the connection for all selected clusters. The data source is created even if the connection tests fail.