# Sqoop Export

You can use the **Sqoop Export** job entry to export data from Hadoop into an RDBMS by using Apache Sqoop.

{% hint style="warning" %}
**Important:** When using Sqoop, the Java version on the client must match the major and minor version of the JDK used by the cluster that runs the job. If the versions do not match, an error occurs.
{% endhint %}

You can create, edit, and select a Hadoop cluster configuration. Cluster configuration settings can be reused in other transformation steps and job entries that support Hadoop.

This job entry has two setup modes:

* **Quick Setup**: Provides the minimum options needed to run a Sqoop export (default).
* **Advanced Options**: Provides additional options to manage your export, including a command-line view that you can use to reuse an existing Sqoop command.

For more information about Apache Sqoop, see <http://sqoop.apache.org/>.

### General

* **Name**: Specify the unique name of the job entry on the canvas. You can customize the name or leave it as the default.
* **Advanced Options**: Select **Advanced Options** to switch to **Advanced Options** mode. In Advanced Options mode, select **Quick Setup** to return to Quick Setup mode.

### Quick Setup mode

![PDI Sqoop export step Quick Setup mode](https://773338310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYwnJ6Fexn4LZwKRHghPK%2Fuploads%2Fgit-blob-fab93af823734c7059d607b5b8984f6b5bdf7f87%2FPDI%20Sqoop%20export%20step%20Quick%20Setup%20mode.png?alt=media)

#### Source

The source refers to the Hadoop cluster where the data you want to export is stored.

| Option               | Definition                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Hadoop Cluster**   | <p>The Hadoop cluster that contains the data for export.</p><p>Select <strong>Choose Available</strong> to pick an existing cluster configuration. If you do not have any existing cluster connections, select <strong>New</strong>.</p><p>For Hadoop information, see <a href="https://help.hitachivantara.com/Documentation/Pentaho/9.5/Work_with_data/Use_Hadoop_with_Pentaho">Use Hadoop with Pentaho</a>.</p> |
| **Edit**             | Edit the selected Hadoop cluster configuration.                                                                                                                                                                                                                                                                                                                                                                    |
| **New**              | Create a new Hadoop cluster configuration.                                                                                                                                                                                                                                                                                                                                                                         |
| **Export Directory** | The HDFS directory that contains the data you want to export.                                                                                                                                                                                                                                                                                                                                                      |
| **Browse**           | <p>Browse the cluster file system and select the directory that contains your export data.</p><p><strong>Note:</strong> Browse works only when you have a valid cluster connection configured and selected.</p>                                                                                                                                                                                                    |

<details>

<summary>Open File dialog box</summary>

When you have a valid cluster connection, select **Browse** to open the **Open File** dialog box.

| Option                        | Definition                                                                                             |
| ----------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Open from Folder**          | The path and name of the HDFS directory you are browsing. This directory becomes the active directory. |
| **Up One Level**              | Display the parent directory of the active directory.                                                  |
| **Delete**                    | Delete a folder from the active directory.                                                             |
| **Create Folder**             | Create a new folder in the active directory.                                                           |
| **Active Directory Contents** | Display the contents of the active directory.                                                          |
| **Filter**                    | Filter the items displayed in the active directory contents.                                           |

</details>

#### Target

The target refers to the database where you want to export the data.

| Option                  | Definition                                                                                                                                                                                                                               |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Database Connection** | <p>Select <strong>Choose Available</strong> to select an existing database connection.</p><p>If you do not have an existing connection, select <strong>New</strong>. To modify an existing connection, select <strong>Edit</strong>.</p> |
| **Edit**                | Edit the selected database connection.                                                                                                                                                                                                   |
| **New**                 | Create a new database connection. For more information, see [Define data connections](https://help.hitachivantara.com/Documentation/Pentaho/9.5/Setup/Define_data_connections).                                                          |
| **Table**               | The destination table name. If your database requires a schema, use `SCHEMA.TABLE_NAME`. The table must already exist and its structure must match the source data format.                                                               |
| **Browse**              | Browse configured database connections by using the Database Explorer.                                                                                                                                                                   |

### Advanced Options mode

The **Advanced Options** mode displays **List View** by default.

{% hint style="info" %}
If you configured values in **Quick Setup** mode, those values display in **List View**.
{% endhint %}

![Sqoop export step Advanced Options mode dialog box](https://773338310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYwnJ6Fexn4LZwKRHghPK%2Fuploads%2Fgit-blob-cc15c60a8738a0b9ebcbcf0b52bb865d09e42148%2FPDI%20Sqoop%20export%20step%20Advanced%20Options%20mode.png?alt=media)

| Option                | Definition                                                                                                                                                                                                                                                                                     |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **List View**         | <p>View and edit settings as <strong>Argument</strong>/<strong>Value</strong> pairs on the <strong>Default</strong> tab.</p><p>Use the <strong>Custom</strong> tab to add your own argument/value pairs.</p><p>You can also configure advanced exports such as exports from Hive or HBase.</p> |
| **Command Line View** | Enter command-line arguments. A typical use case is pasting an existing Sqoop command line into this field.                                                                                                                                                                                    |
