Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Link to a Relational Database

Updated on 2024-11-06 GMT+08:00

Description

By creating a JDBC link, you can extract data from or load data to the following relational databases:
  • RDS for PostgreSQL
  • RDS for SQL Server
  • PostgreSQL
  • Microsoft SQL Server

Sample Link

{
    "links": [
        {
            "link-config-values": {
                "configs": [
                    {
                        "inputs": [
                            {
                                "name": "linkConfig.databaseType",
                                "value": "MYSQL"
                            },
                            {
                                "name": "linkConfig.host",
                                "value": "10.120.205.30"
                            },
                            {
                                "name": "linkConfig.port",
                                "value": "3306"
                            },
                            {
                                "name": "linkConfig.database",
                                "value": "DB_name"
                            },
                            {
                                "name": "linkConfig.username",
                                "value": "username"
                            },
                            {
                                "name": "linkConfig.password",
                                "value": "Add password here"
                            },
                            {
                                "name": "linkConfig.fetchSize",
                                "value": "100000"
                            },
                            {
                                "name": "linkConfig.commitSize",
                                "value": "10000"
                            },
                            {
                                "name": "linkConfig.usingNative",
                                "value": "false"
                            },
                            {
                                "name": "linkConfig.useSSL",
                                "value": "false"
                            }
                        ],
                        "name": "linkConfig"
                    }
                ]
            },
            "name": "mysql_link",
            "connector-name": "generic-jdbc-connector"
        }
    ]
}

Link Parameters

Parameter

Mandatory

Type

Description

linkConfig.databaseType

Yes

Enumeration

Database type. The options are as follows:

  • ORACLE
  • MYSQL
  • SQLSERVER
  • DB2
  • POSTGRESQL
  • DWS
  • DDM
  • SAP HANA

linkConfig.host

Yes

String

IP address of the database server

linkConfig.port

Yes

String

Port number of the database server

linkConfig.databaseconfig

No

Enumeration

Oracle database link type. This parameter is available only when an Oracle link is created. The options are as follows:
  • SERVICENAME: Use SERVICE_NAME to connect to the Oracle database.
  • SID: Use SID to connect to the Oracle database.

linkConfig.sidname

No

String

Oracle instance ID, which is used to differentiate databases by instances. This parameter is available only when an Oracle link is created and the database link type linkConfig.databaseconfig is set to SID.

linkConfig.database

No

String

Database name

linkConfig.username

Yes

String

Username

linkConfig.password

Yes

String

Password

linkConfig.fetchSize

No

String

Number of data rows obtained each time

linkConfig.commitSize

No

String

Number of data rows submitted in each request

linkConfig.usingNative

No

Boolean

Whether to use the local API acceleration function of the database

When creating a MySQL link, you can use the LOAD DATA function of MySQL to accelerate data import and improve the performance of importing data to the MySQL database.

NOTE:

The REPLACE and IGNORE modifiers are used to process the injected rows that have the same unique key value (PRIMARY KEY or UNIQUE index value) as an existing row.

  • If Constraint Conflict Handling is set to replace into or local and the REPLACE modifier is used, a new row with the same unique key value as an existing row will replace the existing row.
  • If Constraint Conflict Handling is set to insert into, the IGNORE modifier is used by default, and a new row with the same unique key value as an existing row will be discarded, but the task will not be terminated. The MySQL service cannot stop file transfer in progress. Therefore, the number of written records displayed on the CDM console is inconsistent with the actual number of updated rows.

For details about the MySQL local mode, visit https://dev.mysql.com/doc/refman/8.0/en/load-data.html.

linkConfig.isRds

No

Boolean

Whether RDS is supported. The default value true is used for cloud databases and false is used for other databases.

linkConfig.useSSL

No

Boolean

Whether to enable SSL encrypted transmission for RDS. This parameter is available only when you create a DWS connection.

linkConfig.jdbcProperties

No

Map

Link attribute, which specifies the JDBC connector attributes of the data source. For details about how to configure the link attributes, see the JDBC connector description of the corresponding database.

linkConfig.version

No

Enumeration

Oracle database version. This parameter is available only when you create an Oracle link. The options are as follows:

  • HIGH_VERSION: Select this value if the Oracle database version is later than 12.1.
  • MED_VERSION: Select this value if the Oracle database version is 12.1.
  • LOW_VERSION: Select this value if the Oracle database version is earlier than 12.1.

If error message "java.sql.SQLException: Protocol violation" is displayed, select another option.

dialect.identifierEnclose

No

String

Reference identifier, which is the delimiter between the referenced table names or column names. For details, see the product documentation of the corresponding database.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback