Create an AnalyticDB for PostgreSQL compute source
An AnalyticDB for PostgreSQL compute source binds a Dataphin project to an AnalyticDB for PostgreSQL instance, providing the compute engine for ADB_FOR_PG nodes, ad hoc queries, and general-purpose scripts.
Prerequisites
-
The Dataphin compute engine is set to AnalyticDB for PostgreSQL. Set the compute engine of a Dataphin instance to AnalyticDB for PostgreSQL.
-
You have the schema, username, and password for the AnalyticDB for PostgreSQL database.
-
The configuration user has metadata permissions and write/create-table permissions. AnalyticDB for PostgreSQL grants metadata permissions to all users by default.
-
To configure task queue priorities, create resource queues in AnalyticDB for PostgreSQL and assign users to them. These users also need metadata and write/create-table permissions.
-
If you use AnalyticDB for PostgreSQL as a metadata warehouse:
-
You have created a database or schema in AnalyticDB for PostgreSQL.
-
The configured user has schema metadata permissions and write/create-table permissions for metadata warehouse initialization.
-
-
To create partitions for an offline single-node pipeline, specify the partition information in the preparation statement or the one-click table creation statement.
Permissions
-
All system roles except for label-related business roles and business members and custom global roles with Cluster - View permissions can view cluster details.
-
Super administrators, system administrators, and custom global roles with Cluster - Manage permissions can create and manage AnalyticDB for PostgreSQL clusters, specify which users can reference a cluster, and assign cluster administrators.
-
Cluster administrators can manage the clusters for which they are responsible.
-
Super administrators, system administrators, and users with the Compute Source Management - Create custom global role can create AnalyticDB for PostgreSQL compute sources and reference clusters they have permission to use.
Procedure
-
On the Dataphin homepage, choose Planning > Compute Source.
-
On the Compute Source page, click Add Compute Source and select AnalyticDB for PostgreSQL Compute Source.
-
In the Create Compute Source dialog box, configure the following parameters:
Reference a specified cluster
Parameter
Description
Basic Information
Compute Type
Select AnalyticDB for PostgreSQL.
Compute Source Name
Supports Chinese characters, letters, digits, underscores (_), and hyphens (-).
Configuration Method
Select Reference A Specified Cluster and choose a cluster you have permission to reference. Click View to see cluster details on the View AnalyticDB For PostgreSQL Cluster page. If the required cluster is unavailable, click Configure Cluster to create one on the Create AnalyticDB For PostgreSQL Cluster page.
NoteChanges to the cluster information are automatically synced to the current compute source.
Compute Source Description
Enter a description. Maximum: 128 characters.
Connection Configuration
JDBC URL
Uses the JDBC URL of the selected AnalyticDB For PostgreSQL cluster by default. This value is read-only.
DataBase
Select or enter a database.
Schema
Select or enter the database schema.
Queue Configuration
Priority Task Queue
You can select Use Default Execution User or Custom.
-
Use Default Execution User: Uses the default execution user that is configured in the selected cluster.
-
Custom: Includes five priority levels: Highest, High, Medium, Low, and Lowest. For each priority level, you can select Use Cluster's Default Execution User or Custom. If you select Custom, enter the execution Username and Password.
NoteAnalyticDB for PostgreSQL uses resource queues to manage priorities. To create custom priority task queues, you must first create usernames and passwords for each priority level in AnalyticDB for PostgreSQL.
Use individual configuration
Parameter
Description
Basic Information
Compute Type
Select AnalyticDB for PostgreSQL.
Compute Source Name
Supports Chinese characters, letters, digits, underscores (_), and hyphens (-).
Select Use Individual Configuration.
Compute Source Description
Enter a description. Maximum: 128 characters.
Connection Configuration
Version
Select 6.x or 7.x. The default is 7.x.
JDBC URL
Enter the JDBC URL. The format is
jdbc:postgresql://{host}:{port}/{database name}.Schema
Select or enter the database schema.
Username
Enter the username and password for the AnalyticDB for PostgreSQL database. Ensure the user has the required database permissions.
Password
Queue Configuration
Priority Task Queue
You can select Use Default Execution User or Custom.
-
Use Default Execution User: Uses the default execution user specified in the preceding configuration.
-
Custom: Includes five priority levels: Highest, High, Medium, Low, and Lowest. For each priority level, you can select Use Default Execution User or Custom. If you select Custom, enter the execution Username and Password.
NoteAnalyticDB for PostgreSQL uses resource queues to manage priorities. To create custom priority task queues, you must first create usernames and passwords for each priority level in AnalyticDB for PostgreSQL.
-
-
Click Test Connection.
-
After the test succeeds, click Submit.
After the compute source is created, associate it with a project. Manage project space permissions and compute sources.