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/ Best Practices/ Tutorials/ Migrating Data from OBS to DLI

Migrating Data from OBS to DLI

Updated on 2023-07-14 GMT+08:00

Scenario

DLI is a fully hosted big data query service. This section describes how to use CDM to migrate data from OBS to DLI. The procedure includes four steps:

  1. Creating a CDM Cluster
  2. Creating a DLI Link
  3. Creating an OBS Link
  4. Creating a Migration Job

Prerequisites

  • You have enabled OBS and DLI and have the permissions to read data from OBS.
  • You have created resource queues, databases, and tables on DLI.

Creating a CDM Cluster

If CDM is used an independent service, create a CDM cluster by following the instructions in Creating a CDM Cluster. If CDM is used as a module of DataArts Studio, create a CDM cluster by following the instructions in Creating a CDM Cluster.

In this scenario, if the CDM cluster is used only to migrate data from OBS to DLI and does not need to migrate data of other data sources, there is no special requirements on the VPC, subnet, and security group of the CDM cluster. You can specify them based on your needs. CDM accesses DLI and OBS through the intranet. The flavor of the CDM cluster is selected based on the amount of data to be migrated. Generally, cdm.medium meets the requirements for most migration scenarios.

Creating a DLI Link

  1. Click Job Management in the Operation column of the CDM cluster. On the displayed page, click the Links tab and then Create Link. The Select Connector page is displayed.

    Figure 1 Selecting a connector

  2. Select Data Lake Insight, click Next, and configure the DLI link parameters. See Figure 2.

    • Name: Enter a custom link name, for example, dlilink.
    • AK and SK: Enter the AK and SK used for accessing the DLI database.
    • Project ID: Enter the project ID of the region to which DLI belongs.
    Figure 2 Creating a DLI link

  3. Click Save. The Link Management page is displayed.

Creating an OBS Link

  1. Click Job Management in the Operation column of the CDM cluster. On the displayed page, click the Links tab and then Create Link. The Select Connector page is displayed.

    Figure 3 Selecting a connector type

  2. Select Object Storage Service (OBS) and click Next to configure parameters for the OBS link.

    • Name: Enter a custom link name, for example, obslink.
    • OBS Server and Port: Enter the actual OBS address information.
    • AK and SK: Enter the AK and SK used for logging in to OBS.
      To obtain an access key, perform the following steps:
      1. Log in to the management console, move the cursor to the username in the upper right corner, and select My Credentials from the drop-down list.
      2. On the My Credentials page, choose Access Keys, and click Create Access Key. See Figure 4.
        Figure 4 Clicking Create Access Key
      3. Click OK and save the access key file as prompted. The access key file will be saved to your browser's configured download location. Open the credentials.csv file to view Access Key Id and Secret Access Key.
        NOTE:
        • Only two access keys can be added for each user.
        • To ensure access key security, the access key is automatically downloaded only when it is generated for the first time and cannot be obtained from the management console later. Keep them properly.
    Figure 5 Creating an OBS link

  3. Click Save. The Link Management page is displayed.

Creating a Migration Job

  1. Choose Table/File Migration > Create Job to create a job for migrating data from OBS to DLI. See Figure 6.

    Figure 6 Creating a job for migrating data from OBS to DLI
    • Job Name: Enter a custom job name.
    • Source Link Name: Select the obslink link created in Creating an OBS Link.
      • Bucket Name: Select the bucket from which the data is to be migrated.
      • Source Directory/File: Set this parameter to the path of the data to be migrated.
      • File Format: Select CSV or JSON for transferring files to a data table.
      • Retain the default values of the optional parameters in Show Advanced Attributes.
    • Destination Link Name: Select the dlilink link created in Creating a DLI Link.
      • Resource Queue: Enter the resource queue to which the destination table belongs.
      • Database Name: Enter the name of the database to which data is to be written.
      • Table Name: Enter the name of the table to which data is to be written. CDM cannot automatically create tables on DLI. The table must be created on DLI in advance, and the field types and formats of the table must be consistent with those of the data to be migrated.
      • Clear Before Importing Data: Choose whether to clear data in the destination table before data import. In this example, retain the default value.

  2. Click Next. The Map Field page is displayed. CDM automatically matches the source and destination fields.

    • If the field mapping is incorrect, you can drag the fields to adjust the mapping.
    • CDM supports field conversion during the migration. For details, see Converting Fields.

  3. Click Next and set task parameters. Generally, retain the default values of all parameters.

    In this step, you can configure the following optional functions:
    • Retry If Failed: Determine whether to automatically retry the job if it fails. Retain the default value Never.
    • Group: Select the group to which the job belongs. The default group is DEFAULT. On the Job Management page, jobs can be displayed, started, or exported by group.
    • Schedule Execution: Determine whether to automatically execute the job at a scheduled time. Retain the default value No in this example.
    • Concurrent Extractors: Enter the number of concurrent extractors. An appropriate value improves migration efficiency. For details, see Performance Tuning. Retain the default value 1.
    • Write Dirty Data: Specify this parameter if data that fails to be processed or filtered out during job execution needs to be written to OBS for future viewing. Before writing dirty data, create an OBS link on the CDM console. Retain the default value No so that dirty data is not recorded.
    Figure 7 Configuring the task

  4. Click Save and Run. The Job Management page is displayed, on which you can view the job execution progress and result.
  5. After the job is successfully executed, in the Operation column of the job, click Historical Record to view the job's historical execution records and read/write statistics.

    On the Historical Record page, click Log to view the job logs.

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