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
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
Help Center/ Cloud Data Migration/ FAQs/ Troubleshooting/ What Can I Do If the Map Field Tab Page Cannot Display All Columns?

What Can I Do If the Map Field Tab Page Cannot Display All Columns?

Updated on 2023-02-06 GMT+08:00

Symptom

When data is exported from HBase/CloudTable using CDM, fields in the HBase/CloudTable table on the Map Field tab page occasionally cannot be displayed completely and cannot match the fields on the migration destination. As a result, the data imported to the migration destination is incomplete.

Possible Cause

HBase/CloudTable are schema-less, and the number of columns in each data is not fixed. On the Map Field page, there is a high probability that all columns cannot be obtained by obtaining example values. In this case, the data on the migration destination is incomplete after the job is executed.

To solve this problem, perform any of the following methods:
  1. Add fields on the Map Field tab page.
  2. Edit the JSON file of the job on the Job Management page (modify the fromJobConfig.columns and toJobConfig.columnList parameters).
  3. Export the JSON file of the job to the local PC, modify the parameters in the JSON file (the principle is the same to that in 2), and then import the JSON file back to CDM.

You are advised to perform 1. The following uses data migration from HBase to DWS as an example.

Solution 1: Adding Fields on the Map Field Tab Page

  1. Obtain all fields in the tables to be migrated from source HBase. Use colons (:) to separate column families and columns. The following gives an example:
    rowkey:rowkey
    g:DAY_COUNT
    g:CATEGORY_ID
    g:CATEGORY_NAME
    g:FIND_TIME
    g:UPLOAD_PEOPLE
    g:ID
    g:INFOMATION_ID
    g:TITLE
    g:COORDINATE_X
    g:COORDINATE_Y
    g:COORDINATE_Z
    g:CONTENT
    g:IMAGES
    g:STATE
  2. On the Job Management page, locate the job for exporting data from HBase to DWS, click Edit in the row where the job resides, and go to the Map Field tab page.
    Figure 1 Field mapping 03
  3. Click . In the dialog box that is displayed, select Add a new field.
    Figure 2 Adding a field 04
    NOTE:
    • After a field is added, the example value of the new field is not displayed on the console. This does not affect the transmission of field values. CDM directly writes the field values to the migration destination.
    • To add new fields, the migration source must be MongoDB, HBase, relational databases, or Redis (data in Redis must be in the Hash format).
  4. After all fields are added, check whether the mapping between the migration source and destination is correct. If the mapping is incorrect, drag the fields to adjust the field mapping.
  5. Click Next and Save.

Solution 2: Modifying a JSON File

  1. Obtain all fields in the tables to be migrated from source HBase. Use colons (:) to separate column families and columns. The following gives an example:
    rowkey:rowkey
    g:DAY_COUNT
    g:CATEGORY_ID
    g:CATEGORY_NAME
    g:FIND_TIME
    g:UPLOAD_PEOPLE
    g:ID
    g:INFOMATION_ID
    g:TITLE
    g:COORDINATE_X
    g:COORDINATE_Y
    g:COORDINATE_Z
    g:CONTENT
    g:IMAGES
    g:STATE
  2. In the DWS destination table, obtain the fields corresponding to the HBase table fields.
    If any field name corresponding to the HBase field does not exist in the DWS destination table, add it to the DWS table schema. Suppose that the fields in the DWS table are complete and are displayed as follows:
    rowkey
    day_count
    category
    category_name
    find_time
    upload_people
    id
    information_id
    title
    coordinate_x
    coordinate_y
    coordinate_z
    content
    images
    state
  3. On the Job Management page, locate the job for exporting data from HBase to DWS, and choose More > Edit Job JSON in the row where the job resides.
  4. On the page that is displayed, edit the JSON file of the job.
    1. Modify the fromJobConfig.columns parameter of the migration source to the HBase fields obtained in 1. Use & to separate column numbers and colons (:) to separate column families and columns. The following gives an example:
      "from-config-values": {
                      "configs": [
                          {
                              "inputs": [
                                  {
                                      "name": "fromJobConfig.table",
                                      "value": "HBase"
                                  },
                                  {
                                      "name": "fromJobConfig.columns",
                                      "value": "rowkey:rowkey&g:DAY_COUNT&g:CATEGORY_ID&g:CATEGORY_NAME&g:FIND_TIME&g:UPLOAD_PEOPLE&g:ID&g:INFOMATION_ID&g:TITLE&g:COORDINATE_X&g:COORDINATE_Y&g:COORDINATE_Z&g:CONTENT&g:IMAGES&g:STATE"
                                  },
                                  {
                                      "name": "fromJobConfig.formats",
                                      "value": {
                                          "2": "yyyy-MM-dd",
                                          "undefined": "yyyy-MM-dd"
                                      }
                                  }
                              ],
                              "name": "fromJobConfig"
                          }
                      ]
                  }
    2. Modify the toJobConfig.columnList parameter of the migration source to the field list of DWS obtained in 2.
      The sequence must be the same as that of HBase to ensure correct field mapping. Use & to separate field names. The following gives an example:
      "to-config-values": {
                      "configs": [
                          {
                              "inputs": [
                                  {
                                      "name": "toJobConfig.schemaName",
                                      "value": "dbadmin"
                                  },
                                  {
                                      "name": "toJobConfig.tablePreparation",
                                      "value": "DO_NOTHING"
                                  },
                                  {
                                      "name": "toJobConfig.tableName",
                                      "value": "DWS "
                                  },
                                  {
                                      "name": "toJobConfig.columnList",
                                      "value": "rowkey&day_count&category&category_name&find_time&upload_people&id&information_id&title&coordinate_x&coordinate_y&coordinate_z&content&images&state"
                                  },
                                  {
                                      "name": "toJobConfig.shouldClearTable",
                                      "value": "true"
                                  }
                              ],
                              "name": "toJobConfig"
                          }
                      ]
                  }
    3. Retain the settings of other parameters, and then click Save and Run.
  5. After the job is completed, check whether the data in the DWS table matches the data in HBase. If the mapping is incorrect, check whether the sequences of the HBase and DWS fields in the JSON file are the same.

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