Sqoop Export
You can use the Sqoop Export job to export data from Hadoop into an RDBMs using Apache Sqoop. You can create, edit, and select a Hadoop cluster configuration to use. Hadoop cluster configurations settings can be reused in transformation steps and job entries that support this feature. This job has two setup modes:
- The Quick Setup mode provides the minimum options necessary to perform a successful Sqoop export. (Default)
- The Advanced Options mode provides more options to manage your Sqoop export. The Advanced Options mode also has a command line view which allows you to reuse an existing Sqoop command from the command line.
For additional information about Apache Sqoop, see http://sqoop.apache.org/.
General
The following fields are general to this job entry:
- 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: Click the Advanced Options link to switch to the Advanced Options mode. You can click the Quick Setup link in the Advanced Options mode to switch to the Quick Setup mode.
Quick Setup mode
The source refers to the Hadoop cluster where your Sqoop data that you want to import into a database is stored.
Option | Definition |
Hadoop Cluster |
The name of the Hadoop cluster that contains the data for export. Use the Use Advanced Options to specify configuration information for the host names and ports for HDFS, Job Tracker, and other big data cluster components (default). Click Choose Available to select an existing cluster to use. If you do not have any existing cluster connections, click New. Information on Hadoop can be found in Use Hadoop with Pentaho. |
Edit | Click Edit to open the Hadoop Cluster dialog box where you can edit the configuration information. |
New | Click New to open the Hadoop Cluster dialog box where you can add a new Hadoop cluster configuration. |
Export Directory | Path of the HDFS directory containing the Sqoop data you want to export. |
Browse |
Click Browse to display the Open File dialog box, which displays the file system of the cluster. Click the directory to select the directory with your Sqoop data. Note: Browse only works when you have a valid cluster connection configured and selected. |
When you have a valid cluster connection, click Browse to display the Open File dialog box to view the cluster files.
Option | Definition |
Open from Folder | Indicates the path and name of the HDFS directory you want to browse. This directory becomes the active directory. |
Up One Level | Displays the parent directory of the active directory shown in the Open from Folder field. |
Delete | Deletes a folder from the active directory. |
Create Folder | Creates a new folder in the active directory. |
Active Directory Contents (no label) | Displays the active directory, which is the one that is listed in the Open from Folder field. |
Filter | Applies a filter to the results displayed in the active directory contents. |
The target refers to the database where you want to put your Sqoop data.
Option | Definition |
Database Connection |
Click Choose Available to select the name of an existing database connection that contains the data for export. If you do not have an existing connection, click New. If you need to modify an existing connection, click Edit. |
Edit | Click Edit to open the Database Connection dialog box if you need to modify an existing connection database. |
New | Click New to open the Database Connection dialog box where you can add a new database connection. See Define data connections |
Table | The name of the target destination table. If the source database requires a schema, you must supply it in the format: SCHEMA.TABLE_NAME . This table must exist in
the destination database and its structure must match the input data’s format. |
Browse | Click Browse to open the Database Explorer and explore configured database connections. |
Advanced Options mode
The Advanced Options mode displays the List View by default. Click Command Line View to open the Command Line field.
Option | Definition |
List View |
The List View displays settings for Argument and Value pairs in the Default tab. You can modify these settings according to your needs, including options to configure an export from Hive or HBase. The Custom tab is where you can create your own Argument and Value pairs. |
Command Line View | Click the Command Line view to enter command line arguments. A typical use is to paste an existing Sqoop command line argument into this field. |