Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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
On this page

Importing Data to the Table

Updated on 2022-12-07 GMT+08:00

You can import data from OBS to a table created in DLI.

Precautions

  • Only one path can be specified during data import. The path cannot contain commas (,).
  • To import data in CSV format to a partitioned table, place the column to be partitioned in the last column of the data source.
  • You are advised not to concurrently import data in to a table. If you concurrently import data into a table, there is a possibility that conflicts occur, leading to failed data import.
  • The imported file can be in CSV, Parquet, ORC, JSON, and Avro format. The encoding format must be UTF-8.

Prerequisites

The data to be imported has been stored on OBS.

Procedure

  1. You can import data on either the Data Management page or the SQL Editor page.

    • To import data on the Data Management page:
      1. On the left of the management console, choose Data Management > Databases and Tables.
      2. Click the name of the database corresponding to the table where data is to be imported to switch to the table management page.
      3. Locate the row where the target table resides and choose More > Import in the Operation column. The Import dialog box is displayed.

    • To import data on the SQL Editor page:
      1. On the left of the management console, click SQL Editor.
      2. In the navigation tree on the left of SQL Editor, click Databases to see all databases. Click the database where the target table belongs. The table list is displayed.
      3. Click on the right of the table and choose Import from the shortcut menu. The Import page is displayed.

  2. In the Import dialog box, set the parameters based on Table 1.

    Table 1 Description

    Parameter

    Description

    Example

    Databases

    Database where the current table is located.

    -

    Table Name

    Name of the current table.

    -

    Queues

    Queue where the imported data will be used

    -

    File Format

    Format of the data source file to be imported. The CSV, Parquet, ORC, JSON, and Avro formats are supported. Encoding format. Only UTF-8 is supported.

    CSV

    Path

    You can directly enter a path or click and select an OBS path. If no bucket is available, you can directly switch to the OBS management console and create an OBS bucket.

    • When creating an OBS table, you must specify a folder as the directory. If a file is specified, data import may be failed.
    • If a folder and a file have the same name in the OBS directory, the file path is preferred as the path of the data to be imported.
    NOTE:

    The path can be a file or folder.

    obs://DLI/sampledata.csv

    Table Header: No/Yes

    This parameter is valid only when File Format is set to CSV. Whether the data source to be imported contains the table header.

    Click Advanced Settings and select the check box next to Table Header: No. If the check box is selected, the table header is displayed. If the check box is deselected, no table header is displayed.

    -

    User-defined Delimiter

    This parameter is valid only when File Format is set to CSV and you select User-defined Delimiter.

    The following delimiters are supported:

    • Comma (,)
    • Vertical bar (|)
    • Tab character (\t)
    • Others: Enter a user-defined delimiter.

    Default value: comma (,)

    User-defined Quotation Character

    This parameter is valid only when File Format is set to CSV and User-defined Quotation Character is selected.

    The following quotation characters are supported:

    • Single quotation mark (')
    • Double quotation marks (")
    • Others: Enter a user-defined quotation character.

    Default value: double quotation marks (")

    User-defined Escape Character

    This parameter is valid only when File Format is set to CSV and you select User-defined Escape Character.

    The following escape characters are supported:

    • Backslash (\)
    • Others: Enter a user-defined escape character.

    Default value: backslash (\)

    Date Format

    This parameter is valid only when File Format is set to CSV or JSON.

    This parameter specifies the format of the date in the table and is valid only Advanced Settings is selected. The default value is yyyy-MM-dd. For definition of characters involved in the date pattern, see Table 3 in the

    2000-01-01

    Timestamp Format

    This parameter is valid only when File Format is set to CSV or JSON.

    This parameter specifies the format of the timestamp in the table and is valid only Advanced Settings is selected. The default value is yyyy-MM-dd HH:mm:ss. For definition of characters involved in the time pattern, see Table 3 in the

    2000-01-01 09:00:00

    Error Records Path

    This parameter is valid only when File Format is set to CSV or JSON.

    The parameter specifies the error data is stored in the corresponding OBS path and is valid only Advanced Settings is selected.

    obs://DLI/

  3. Click OK.
  4. You can view the imported data in either of the following ways:

    NOTE:

    Currently, only the first 10 records are displayed.

    • Choose Data Management > Databases and Tables in the navigation pane of the console. Locate the row that contains the database where the target table belongs and click More > View Properties in the Operation column. In the displayed dialog box, click the Preview tab to view the imported data.
    • In the Databases tab of the SQL Editor, click the database name to go to the table list. Click on the right of a table name and choose View Properties from the shortcut menu. In the displayed dialog box, click Preview to view the imported data.

  5. (Optional) View the status and execution result of the importing job on the Job Management > SQL Jobs page.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback