Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Data Processing
  • Getting started
    • All guides
      • Connecting to component interfaces
      • Using Sqoop
      • Apache Iceberg™ configuration
    • Creating and using Python virtual environments
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • FAQ

In this article:

  • Creating a JDBC connection string
  • Installing a JDBC driver
  • Importing with Sqoop
  • To Object Storage
  • To an HDFS directory
  • To Apache Hive
  • To Apache HBase
  1. Step-by-step guides
  2. Apache and other third-party services
  3. Using Sqoop

Using Sqoop

Written by
Yandex Cloud
Updated at March 19, 2026
View in Markdown
  • Creating a JDBC connection string
  • Installing a JDBC driver
  • Importing with Sqoop
    • To Object Storage
    • To an HDFS directory
    • To Apache Hive
    • To Apache HBase

Sqoop is used to import databases to the Yandex Data Processing cluster from external sources. This section covers:

  • Info on creating connection strings and setting up drivers for Sqoop.

  • Scoop commands for importing data to:

    • Yandex Object Storage
    • HDFS directory
    • Apache Hive
    • Apache HBase

Note

Sqoop is not supported for Yandex Data Processing clusters version 2.0 and higher. Alternatively, use Apache Spark™ features.

Creating a JDBC connection stringCreating a JDBC connection string

A JDBC connection string has the following format:

PostgreSQL
MySQL®
jdbc:postgresql://<DB_server_address>:5432/<DB_name>

For Yandex Managed Service for PostgreSQL, use a string with a special FQDN pointing at the master host:

jdbc:postgresql://c-<cluster_ID>.rw.mdb.yandexcloud.net:6432/<DB_name>

You can get the cluster ID with the list of clusters in the folder.

jdbc:mysql://<DB_server_address>:3306/<DB_name>

For Yandex Managed Service for MySQL®, use a string with a special FQDN pointing at the master host:

jdbc:mysql://c-<cluster_ID>.rw.mdb.yandexcloud.net:3306/<DB_name>

You can get the cluster ID with the list of clusters in the folder.

Installing a JDBC driverInstalling a JDBC driver

For Sqoop to connect to the database using a JDBC connection string, install the JDBC driver:

PostgreSQL
MySQL®

Yandex Data Processing has a pre-installed Yandex Managed Service for PostgreSQL driver, requiring no additional actions.

Connect to the Yandex Data Processing data storage subcluster host over SSH and run this command:

MYSQL_VER="8.0.25" && \
wget "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MYSQL_VER}.tar.gz" \
    --output-document 'mysql-connector-java.tar.gz' && \
sudo tar -xf mysql-connector-java.tar.gz -C /var/lib/sqoop/ && \
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/var/lib/sqoop/mysql-connector-java-${MYSQL_VER}.jar

Note

To install another driver version, edit the MYSQL_VER variable in the command.

Importing with SqoopImporting with Sqoop

To Object StorageTo Object Storage

This type of import is available if the Sqoop component is enabled in the Yandex Data Processing cluster.

To import data to an Object Storage bucket:

  1. When creating or updating your Yandex Data Processing cluster, specify the name of the Object Storage bucket to import the data to. Make sure the Yandex Data Processing service account has write permissions for this bucket.

  2. Create JDBC connection strings.

  3. Connect over SSH to the Yandex Data Processing data storage subcluster host.

  4. Install drivers for Sqoop if missing.

  5. Run this command:

    sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
      --connect <JDBC_connection_string> \
      --username <database_username> \
      --P \
      --table '<database_table_name>' \
      --target-dir 's3a://<bucket_name_for_import>/<destination_directory>' \
      --split-by '<table_column>'
    

    Where --split-by is the table column used for splitting.

    Warning

    Do not specify the name of an existing bucket directory.

To an HDFS directoryTo an HDFS directory

This type of import is available if the following services are enabled in the Yandex Data Processing cluster:

  • HBase
  • HDFS
  • Sqoop
  • Yarn
  • Zookeeper

To import data to an HDFS directory:

  1. Create JDBC connect strings.

  2. Connect over SSH to the Yandex Data Processing subcluster’s host to store the data.

  3. Install drivers for Sqoop if missing.

  4. Run this command:

    sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
      --connect <JDBC_connection_string> \
      --username <database_username> \
      --table '<database_table_name>' \
      --target-dir '<HDFS_directory>' \
      --P \
      --split-by '<table_column>'
    

    Where --split-by is the table column used for splitting.

    Warning

    Do not specify the name of an existing HDFS directory.

To Apache HiveTo Apache Hive

This type of import is available if the following services are enabled in the Yandex Data Processing cluster:

  • HDFS
  • Hive
  • Mapreduce
  • Sqoop
  • Yarn

To import data to a Hive table:

  1. When creating or updating your Yandex Data Processing cluster, add the hive:hive.execution.engine key set to mr to the cluster properties.

  2. Create JDBC connection strings.

  3. Connect over SSH to the Yandex Data Processing data storage subcluster host.

  4. Install drivers for Sqoop if missing.

  5. Create a Hive database:

    hive -e "CREATE DATABASE <Hive_database_name>;"
    
  6. Run this command:

    sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
      --connect <JDBC_connect_string> \
      --username <source_database_username> \
      --P \
      --table '<source_database_table_name>' \
      --hive-import \
      --create-hive-table \
      --hive-database '<Hive_database_name>' \
      --hive-table '<Hive_table_name>' \
      --split-by '<table_column>'
    

    Where --split-by is the table column used for splitting.

    Warning

    Do not specify the name of an existing Hive table.

To Apache HBaseTo Apache HBase

This type of import is available if the following services are enabled in the Yandex Data Processing cluster:

  • HBase
  • HDFS
  • Sqoop
  • Yarn
  • Zookeeper

To import data to Apache HBase:

  1. Create JDBC connection strings.

  2. Connect over SSH to the Yandex Data Processing data storage subcluster host.

  3. Install drivers for Sqoop if missing.

  4. Run this command:

    sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
      --connect <JDBC_connect_string> \
      --username <source_database_username> \
      --P \
      --table '<table_name_in_source_database>' \
      --hbase-create-table \
      --column-family '<HBase_column_family>' \
      --hbase-table '<HBase_table_name>' \
      --split-by '<table_column>'
    

    Where --split-by is the table column used for splitting.

    Warning

    Do not specify the name of an existing HBase table.

Was the article helpful?

Previous
Connecting to component interfaces
Next
Apache Iceberg™ configuration
© 2026 Direct Cursus Technology L.L.C.