このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。

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
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

Configuring a Data Mapping Rule

Updated on 2022-09-02 GMT+08:00

Overview

This topic describes how to configure mapping information for a data integration task. Based on mappings between source data fields and destination data fields, ROMA Connect converts the obtained source data and writes it to the destination.

Configuring Mapping Information

  1. On the Create Task page, configure mapping information in auto or manual mode.
    NOTE:
    • Do not use the keywords of the corresponding database as the field names at the source and destination. Otherwise, the task may become abnormal.
    • If MRS Hive is used as the data source type at the destination and you need to configure partition field writing, see Mapping Configuration of MRS Hive Partition Fields.
    • Auto Mapping Configuration

      If metadata is defined at both the source and destination, you can use the automatic mapping mode to configure mapping information.

      Click Automatic Mapping. A mapping rule between the source and destination data fields is automatically created. If the fields are inconsistent, click Edit to change them or click Add Mapping below.

      Figure 1 Automatic mapping
    • Manual Mapping Configuration

      You can manually add mapping rules between source data fields and destination data fields. This method applies to the integration scenario of all data types. You can configure the mapping rule by entering a key-value pair or entering a value in the text box.

      • Key-Value Pair Mode

        By default, the key-value pair input mode is used. Click Add Field Mapping to add mapping rules from source data fields to destination data fields one by one.

      • Text Mode
        Click Text Mode and enter the mapping rule script in the text box. The format is as follows:
        [{
        	"sourceKey": "a1",
        	"targetKey": "b1"
        },
        {
        	"sourceKey": "a2",
        	"targetKey": "b2"
        }]

        sourceKey indicates a source data field, and targetKey indicates a destination data field. In the preceding example, source field a1 is mapped to destination field b1, and source field a2 is mapped to destination field b2.

  2. After the mapping information is configured, if you need to configure the abnormal data storage and post-integration operation, go to (Optional) Configuring Fault Information Storage and (Optional) Configuring the Post-Integration Operation. Otherwise, click Create to complete the data integration task configuration.

Mapping Configuration of MRS Hive Partition Fields

When the data source type is set to MRS Hive at the destination, partition fields can be written. You can configure the partition fields based on the site requirements.

Source Field corresponding to the partition field must be manually entered. The specific requirements are as follows:

Format: {Partition field source field}.format({Character string parsing format},{Partition field parsing format}",{year|month|day|hour|minute|second},{offset})

  • If {Partition field source field} is of the String type, {String parsing format} must be specified.
  • If {Partition field source field} is of the Timestamp type, {String parsing format} can be left blank.
  • If {Partition field source field} is empty, the time when data is written to the destination is used as the partition field.
Figure 2 Partition field mapping of MRS Hive

For example, if the partition field on the destination is yyyymm and the createtime field on the source is used as the source field of the partition field, the time format of the createtime field is ddMMyyyy (day, month, and year), and the partition field on the destination is yyyyMM (year and month). If the value of the partition field is one hour later than the value of the source field, the source field name of the partition field yyyymm in the mapping information is as follows:

  • If the value of createtime is of the String type, set this parameter to createtime.format("ddMMyyyy", "yyyyMM", hour, 1).
  • If the value of createtime is of the Timestamp type, set this parameter to createtime.format("","yyyyMM", hour, 1).
  • If the time when data is written to the destination is used as the partition field, set this parameter to .format(","yyyyMM", hour, 1).

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