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

Common Sqoop Commands and Parameters

Updated on 2024-07-19 GMT+08:00

Common Sqoop commands

Table 1 Common Sqoop commands

Command

Description

import

Imports data to a cluster.

export

Exports data of a cluster.

codegen

Obtains data from a table in the database to generate a Java file and compress the file.

create-hive-table

Creates a Hive table.

eval

Executes a SQL statement and view the result.

import-all-tables

Imports all tables in a database to HDFS.

job

Generates a Sqoop job.

list-databases

Lists database names.

list-tables

List table names.

merge

Merges data in different HDFS directories and saves the data to a specified directory.

metastore

Starts the metadata database to record the metadata of a Sqoop job.

help

Prints help information.

version

Prints the version information.

Common Parameters

Table 2 Common parameters

Category

Parameter

Description

Parameters for database connection

--connect

Specifies the URL for connecting to a relational database.

--connection-manager

Specifies the connection manager class.

--driver jdbc

Specifies the driver package for database connection.

--help

Prints help information.

--password

Specifies the password for connecting to a database.

--username

Specifies the username for connecting to a database.

--verbose

Prints detailed information on the console.

import parameters

--fields-terminated-by

Specifies the field delimiter, which must be the same as that in a Hive table or HDFS file.

--lines-terminated-by

Specifies the line delimiter, which must be the same as that in a Hive table or HDFS file.

--mysql-delimiters

Specifies the default delimiter settings of MySQL.

export parameters

--input-fields-terminated-by

Specifies the field delimiter.

--input-lines-terminated-by

Specifies the line delimiter.

Hive parameters

--hive-delims-replacement

Replaces characters such as \r and \n in data with user-defined characters.

--hive-drop-import-delims

Removes characters such as \r and \n when data is imported to Hive.

--map-column-hive

Specifies the data type of fields during the generation of a Hive table.

--hive-partition-key

Creates a partition.

--hive-partition-value

Imports data to a specified partition of a database.

--hive-home

Specifies the installation directory for Hive.

--hive-import

Specifies that data is imported from a relational database to Hive.

--hive-overwrite

Overwrites existing Hive data.

--create-hive-table

Creates a Hive table. The default value is false. A destination table will be created if it does not exist.

--hive-table

Specifies a Hive table to which data is to be imported.

--table

Specifies the relational database table.

--columns

Specifies the fields of a relational data table to be imported.

--query

Specifies the query statement for importing the query result.

HCatalog parameters

--hcatalog-database

Specifies a Hive database and imports data to it using HCatalog.

--hcatalog-table

Specifies a Hive table and imports data to it using HCatalog.

Others

-m or --num-mappers

Specifies the number of map tasks used by a Sqoop job.

--split-by

Specifies the column based on which Sqoop splits work units. This parameter is used together with -m.

--target-dir

Specifies the temporary directory of HDFS.

--null-string string

Specifies the string to be written for a null value for string columns.

--null-non-string

Specifies the string to be written for a null value for non-string columns.

--check-column

Specifies the column for determining incremental data import.

--incremental append or lastmodified

Incrementally imports data.

append: appends records, for example, appending records that are greater than the value specified by last-value.

lastmodified: appends data that is modified after the date specified by last-value.

--last-value

Specifies the last value of the check column from the previous import.

--input-null-string

Specifies the string to be interpreted as NULL for string columns.

--input-null-non-string

Specifies the string to be interpreted as null for non-string columns. If this parameter is not specified, NULL will be used.

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