

{"id":7552,"date":"2018-02-08T13:48:31","date_gmt":"2018-02-08T13:48:31","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=7552"},"modified":"2021-12-07T12:48:11","modified_gmt":"2021-12-07T07:18:11","slug":"sqoop-import-mainframe","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/","title":{"rendered":"Learn Sqoop Import Mainframe Tool &#8211; Syntax and Examples"},"content":{"rendered":"<p><span style=\"font-weight: 400\">While it comes to import all sequential datasets in a partitioned dataset (PDS) on a mainframe to HDFS we use Sqoop import mainframe tool. Apart from\u00a0Sqoop import mainframe tool&#8217;s introduction, there is much more to know about this tool in <strong><a href=\"https:\/\/data-flair.training\/blogs\/sqoop-introduction\/\">Sqoop<\/a><\/strong>. <\/span><\/p>\n<p><span style=\"font-weight: 400\">So, in this article, we will cover each aspect of Sqoop import-mainframe tool to understand well. Thus, we will start with purpose and syntax of mainframe tool in <a href=\"https:\/\/data-flair.training\/blogs\/sqoop-import-all-tables\/\"><strong>sqoop import<\/strong><\/a>. Also, we will cover all the possible arguments for this tool. Moreover, we will cover all its examples for better understanding of the topic.<\/span><\/p>\n<h3>Introduction to Sqoop Import Mainframe Tool and its Purpose<\/h3>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In Sqoop, there is a tool which we use to import all sequential datasets in a partitioned dataset (PDS) on a mainframe to <a href=\"https:\/\/data-flair.training\/blogs\/hadoop-hdfs-tutorial\/\"><strong>HDFS<\/strong><\/a>. Basically, that tool is what we call import mainframe tool. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Also, A PDS is akin to a directory on the open systems. Likewise, in a dataset, the records can only contain character data. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Moreover here, records will be stored as a single text field with the entire record.<\/span><\/li>\n<\/ul>\n<h3>Syntax of Sqoop Import Mainframe Tool<\/h3>\n<p>$ sqoop import-mainframe (generic-args) (import-args)<br \/>\n$ sqoop-import-mainframe (generic-args) (import-args)<br \/>\n<span style=\"font-weight: 400\">However, \u00a0we can type the import arguments in any order with respect to one another but the <a href=\"https:\/\/data-flair.training\/blogs\/hadoop-tutorial\/\"><strong>Hadoop<\/strong><\/a> generic arguments must precede any import arguments.<\/span><br \/>\n<strong>Table 1. Common arguments<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Argument<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;connect &lt;hostname&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Specify mainframe host to connect<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;connection-manager &lt;class-name&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Specify connection manager class to use<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hadoop-mapred-home &lt;dir&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Override $HADOOP_MAPRED_HOME<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;help<\/span><\/td>\n<td><span style=\"font-weight: 400\">Print usage instructions<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;password-file<\/span><\/td>\n<td><span style=\"font-weight: 400\">Set path for a file containing the authentication password<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">-P<\/span><\/td>\n<td><span style=\"font-weight: 400\">Read password from console<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;password &lt;password&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Set authentication password<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;username &lt;username&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Set authentication username<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;verbose<\/span><\/td>\n<td><span style=\"font-weight: 400\">Print more information while working<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;connection-param-file &lt;filename&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Optional properties file that provides connection parameters<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>a. Connecting to a Mainframe<\/h4>\n<p><span style=\"font-weight: 400\">As we discussed earlier, to import mainframe datasets into<a href=\"https:\/\/data-flair.training\/blogs\/hadoop-high-availability-tutorial\/\"> <strong>HDFS<\/strong>,<\/a> Sqoop is designed. However, in the Sqoop we need to specify a mainframe hostname &#8211;connect argument to do so.<\/span><br \/>\n$ sqoop import-mainframe &#8211;connect z390<br \/>\n<span style=\"font-weight: 400\">However, via ftp this will connect to the mainframe host z390.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In addition, to access it we need to authenticate against the mainframe host. Moreover, to supply a username to the mainframe we can use the &#8211;username. Although there are following ways to supply a password which Sqoop offers. Such as secure and non-secure. Let\u2019s discuss them in detail.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>Secure way of supplying password to the mainframe<\/strong><\/li>\n<\/ul>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">By using the &#8211;password-file argument we need to specify the path to that file. Also, we need to save the password in a file on the user&#8217;s home directory with 400 permissions. Basically, this is the preferred method of entering credentials. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Afterwards, using secure means without exposing the password in the job configuration Sqoop will then read the password from the file and pass it to the MapReduce cluster.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Moreover, the location of the file containing the password can either the Local FS or HDFS.<\/span><\/li>\n<\/ol>\n<p><strong>For Example<\/strong><br \/>\n$ sqoop import-mainframe &#8211;connect z390 \\<br \/>\n&#8211;username david &#8211;password-file ${user.home}\/.password<br \/>\n<span style=\"font-weight: 400\">Likewise, the next possible method of supplying passwords is by using the -P argument. \u00a0That will read a password from a console prompt.<\/span><\/p>\n<div id=\"attachment_7560\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Code-Generation.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7560\" class=\"wp-image-7560 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Code-Generation.png\" alt=\"Sqoop import-mainframe\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Code-Generation.png 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Code-Generation-150x79.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Code-Generation-300x157.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Code-Generation-768x402.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Code-Generation-1024x536.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-7560\" class=\"wp-caption-text\">Sqoop Import Mainframe Tool &#8211; Code generation<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_7563\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Type-Mapping.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7563\" class=\"wp-image-7563 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Type-Mapping.png\" alt=\"Sqoop import-mainframe\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Type-Mapping.png 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Type-Mapping-150x79.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Type-Mapping-300x157.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Type-Mapping-768x402.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Type-Mapping-1024x536.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-7563\" class=\"wp-caption-text\">Sqoop Import Mainframe Tool &#8211; Type Mapping<\/p><\/div>\n<div id=\"attachment_7565\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7565\" class=\"wp-image-7565 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer.png\" alt=\"Sqoop import-mainframe\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer.png 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-150x79.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-300x157.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-768x402.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-1024x536.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-7565\" class=\"wp-caption-text\">Sqoop Import Mainframe Tool &#8211; Data Transfer &#8211; 1<\/p><\/div>\n<div id=\"attachment_7566\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7566\" class=\"wp-image-7566 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-2.png\" alt=\"Sqoop import-mainframe\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-2.png 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-2-150x79.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-2-300x157.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-2-768x402.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-2-1024x536.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-7566\" class=\"wp-caption-text\">Sqoop Import Mainframe Tool &#8211; Data Transfer &#8211; 2<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_7567\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7567\" class=\"wp-image-7567 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-3.png\" alt=\"Sqoop import-mainframe\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-3.png 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-3-150x79.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-3-300x157.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-3-768x402.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Data-Transfer-3-1024x536.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-7567\" class=\"wp-caption-text\">Sqoop Import Mainframe Tool &#8211; Data Transfer &#8211; 3<\/p><\/div>\n<div id=\"attachment_7568\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Post-Processing.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7568\" class=\"wp-image-7568 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Post-Processing.png\" alt=\"Sqoop import-mainframe\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Post-Processing.png 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Post-Processing-150x79.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Post-Processing-300x157.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Post-Processing-768x402.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Post-Processing-1024x536.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-7568\" class=\"wp-caption-text\">Sqoop Import Mainframe Tool &#8211; Post Processing<\/p><\/div>\n<p><span style=\"font-weight: 400\">It is very important to note these following points:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Here, &#8211;password parameter is insecure. Since it is possible that other users may be able to read our password from the command-line arguments by the output of programs like ps.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">However, using the -P argument is the more preferred method rather than using the &#8211;password argument. Also, keep an eye that using insecure means, Credentials may transfer between nodes of the MapReduce cluster.<\/span><\/li>\n<\/ol>\n<p><strong>For Example<\/strong><br \/>\n$ sqoop import-mainframe &#8211;connect z390 &#8211;username david &#8211;password 12345<br \/>\n<strong>Table 2. Import control arguments<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Argument<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;as-avrodatafile<\/span><\/td>\n<td><span style=\"font-weight: 400\">Imports data to Avro Data Files<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;as-sequencefile<\/span><\/td>\n<td><span style=\"font-weight: 400\">Imports data to SequenceFiles<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;as-textfile<\/span><\/td>\n<td><span style=\"font-weight: 400\">Imports data as plain text (default)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;as-parquetfile<\/span><\/td>\n<td><span style=\"font-weight: 400\">Imports data to Parquet Files<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;delete-target-dir<\/span><\/td>\n<td><span style=\"font-weight: 400\">Delete the import target directory if it exists<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">-m,&#8211;num-mappers &lt;n&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Use n map tasks to import in parallel<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;target-dir &lt;dir&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">HDFS destination dir<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;warehouse-dir &lt;dir&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">HDFS parent for table destination<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">-z,&#8211;compress<\/span><\/td>\n<td><span style=\"font-weight: 400\">Enable compression<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;compression-codec &lt;c&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Use Hadoop codec (default gzip)<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>b. Selecting the Files to Import<\/h4>\n<p><span style=\"font-weight: 400\">However, to specify a partitioned dataset name we can use the &#8211;dataset argument. Moreover, in the partitioned dataset, all sequential datasets will be imported.<\/span><\/p>\n<h4>c. Controlling Parallelism<\/h4>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">By making multiple ftp connections to the mainframe, Sqoop imports data in parallel in order to transfer multiple files simultaneously. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Basically, to perform the import by using the -m or &#8211;num-mappers argument we can specify the number of map tasks (parallel processes) to use. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Moreover, each of these arguments takes an integer value. That corresponds to the degree of parallelism to employ. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Also, we can adjust this value to maximize the data transfer rate from the mainframe.<\/span><\/li>\n<\/ol>\n<h4>d. Controlling Distributed Cache<\/h4>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">While starting a <a href=\"https:\/\/data-flair.training\/blogs\/sqoop-job\/\"><strong>Sqoop job<\/strong><\/a> Sqoop will copy the jars in $SQOOP_HOME\/lib folder to job cache every time. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Since Oozie uses its own Sqoop share lib which keeps Sqoop dependencies in the distributed cache hence this is unnecessary when launched by Oozie. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">For the Sqoop dependencies only once Oozie will do the localization on each worker node during the first Sqoop job. Also, reuse the jars on worker node for sub-sequential jobs. <\/span><\/li>\n<\/ol>\n<h4>e. Controlling the Import Process<\/h4>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Basically, it will import all sequential files in a partitioned dataset pds to a directory named pds inside your home directory in <a href=\"https:\/\/data-flair.training\/blogs\/hadoop-hdfs-data-read-and-write-operations\/\"><strong>HDFS<\/strong><\/a>. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Let\u2019s suppose if our username is someuser, hence the import tool will write to \/user\/someuser\/pds\/(files). <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Moreover, with the &#8211;warehouse-dir argument we can adjust the parent directory of the import.<\/span><\/li>\n<\/ol>\n<p><strong> For example<\/strong><br \/>\n$ sqoop import-mainframe &#8211;connect &lt;host&gt; &#8211;dataset foo &#8211;warehouse-dir \/shared \\<br \/>\n\u2026<br \/>\n<span style=\"font-weight: 400\">Moreover, \u00a0<strong>in the \/shared\/pds\/ directory this command would write to a set of files<\/strong>.<\/span><br \/>\n<span style=\"font-weight: 400\">Also, we can choose the target directory explicitly, like so:<\/span><br \/>\n$ sqoop import-mainframe &#8211;connect &lt;host&gt; &#8211;dataset foo &#8211;target-dir \/dest \\<br \/>\n\u2026<br \/>\n<span style=\"font-weight: 400\">Basically, this will import the files into the \/dest directory. &#8211;target-dir is incompatible with &#8211;warehouse-dir.<\/span><br \/>\n<span style=\"font-weight: 400\">However, imports go to a new target location, by default. <\/span><br \/>\n<b>Note: <\/b><span style=\"font-weight: 400\">In HDFS Sqoop will refuse to import and overwrite that directory\u2019s contents if the destination directory already exists.<\/span><\/p>\n<h4>f. File Formats<\/h4>\n<p><span style=\"font-weight: 400\">However, each record in a dataset is stored as a text record with a newline at the end, by default. Also, with the name DEFAULT_COLUMN each record is assumed to contain a single text field. Moreover, it generates a <a href=\"https:\/\/data-flair.training\/blogs\/class-and-object-in-java\/\"><strong>Java class<\/strong><\/a> which can reinterpret the text files that it creates, whenever Sqoop imports data to HDFS.<\/span><br \/>\n<span style=\"font-weight: 400\">Also, we can import mainframe records to Sequence, Avro, or Parquet files.<\/span><br \/>\n<strong>Table 3. Output line formatting arguments<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Argument<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;enclosed-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets a required field enclosing character<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;escaped-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the escape character<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;fields-terminated-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the field separator character<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;lines-terminated-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the end-of-line character<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;mysql-delimiters<\/span><\/td>\n<td><span style=\"font-weight: 400\">Uses MySQL\u2019s default delimiter set: fields: , lines: \\n escaped-by: \\ optionally-enclosed-by: &#8216;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;optionally-enclosed-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets a field enclosing character<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">However, importing to delimited files will not contain any field delimiter because mainframe record contains only one field. Although, with enclosing character the field may be enclosed or by an escaping character field may be escaped.<\/span><br \/>\n<strong>Table 4. Input parsing arguments<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Argument<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;input-enclosed-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets a required field encloser<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;input-escaped-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the input escape character<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;input-fields-terminated-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the input field separator<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;input-lines-terminated-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the input end-of-line character<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;input-optionally-enclosed-by &lt;char&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets a field enclosing character<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">Sqoop generates a Java class when it imports data to HDFS. While doing a delimited-format import, that can reinterpret the text files that it creates. <\/span><br \/>\n<strong>Table 5. Hive arguments<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Argument<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hive-home &lt;dir&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Override $HIVE_HOME<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hive-import<\/span><\/td>\n<td><span style=\"font-weight: 400\">Import tables into Hive (Uses Hive\u2019s default delimiters if none are set.)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hive-overwrite<\/span><\/td>\n<td><span style=\"font-weight: 400\">Overwrite existing data in the Hive table.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;create-hive-table<\/span><\/td>\n<td><span style=\"font-weight: 400\">If set, then the job will fail if the target hive table exits. By default this property is false.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hive-table &lt;table-name&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the table name to use when importing to Hive.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hive-drop-import-delims<\/span><\/td>\n<td><span style=\"font-weight: 400\">Drops \\n, \\r, and \\01 from string fields when importing to Hive.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hive-delims-replacement<\/span><\/td>\n<td><span style=\"font-weight: 400\">Replace \\n, \\r, and \\01 from string fields with user defined string when importing to Hive.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hive-partition-key<\/span><\/td>\n<td><span style=\"font-weight: 400\">Name of a hive field to partition are sharded on<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hive-partition-value &lt;v&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">String-value that serves as partition key for this imported into hive in this job.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;map-column-hive &lt;map&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Override default mapping from SQL type to Hive type for configured columns.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>g.\u00a0Importing Data Into Hive<\/h4>\n<p><span style=\"font-weight: 400\">The major function of\u00a0Sqoop\u2019s import tool\u2019s is to upload our data into files in HDFS. It can also import the data into <a href=\"https:\/\/data-flair.training\/blogs\/apache-hive-tutorial\/\"><strong>Hive<\/strong><\/a> by generating and executing a CREATE TABLE statement to define the data\u2019s layout in Hive,\u00a0if you have a <a href=\"https:\/\/data-flair.training\/blogs\/apache-hive-metastore\/\"><strong>Hive metastore<\/strong><\/a> associated with your HDFS cluster. Moreover, Importing data into Hive is as simple as adding the &#8211;hive-import option to your Sqoop command line.<\/span><\/p>\n<p>It is important to note that this function is incompatible with &#8211;as-avrodatafile as well as\u00a0 &#8211;as-sequencefile.<br \/>\n<span style=\"font-weight: 400\">However, as <a href=\"https:\/\/data-flair.training\/blogs\/apache-hive-architecture\/\"><strong>Hive<\/strong><\/a> supports escaping characters, still it does not handle escaping of new-line character. Although, it does not support the notion of enclosing characters that may include field delimiters in the enclosed string.\u00a0<\/span><br \/>\n<strong>Table 6. HBase arguments<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Argument<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;column-family<\/span><br \/>\n<span style=\"font-weight: 400\">&lt;family&gt;\u00a0 \u00a0 \u00a0\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the target column family for the import<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hbase-create-table<\/span><\/td>\n<td><span style=\"font-weight: 400\">If specified, create missing HBase tables<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hbase-row-key &lt;col&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Specifies which input column to use as the row key\u00a0\u00a0In case if input table contains composite\u00a0key, then &lt;col&gt; must be in the form of a\u00a0comma-separated list of composite key\u00a0attributes.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hbase-table &lt;table-name&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Specifies an HBase table to use as the target instead of HDFS<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hbase-bulkload<\/span><\/td>\n<td><span style=\"font-weight: 400\">Enables bulk loading<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>h. Importing Data Into HBase<\/h4>\n<p><span style=\"font-weight: 400\">However,\u00a0beyond HDFS and Hive, Sqoop supports additional import targets. Also, sqoop can import records into\u00a0 table in <strong><a href=\"https:\/\/data-flair.training\/blogs\/hadoop-hbase-tutorial\/\">HBase<\/a><\/strong>.<\/span><br \/>\n<span style=\"font-weight: 400\">In addition, you instruct Sqoop to import to a table in HBase by specifying &#8211;hbase-table,\u00a0 rather than a directory in HDFS. Also, Sqoop will import data to the table specified as the argument to &#8211;hbase-table.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Moreover, it is very important to note that\u00a0<\/span><span style=\"font-weight: 400\">this function is incompatible with direct import (parameter &#8211;direct).<\/span><br \/>\n<strong>Table 7. Accumulo arguments<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Argument<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-table &lt;table-nam&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Specifies an Accumulo table to use as the target instead of HDFS<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-column-family &lt;family&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the target column family for the import<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-create-table<\/span><\/td>\n<td><span style=\"font-weight: 400\">If specified, create missing Accumulo tables<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-row-key &lt;col&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Specifies which input column to use as the row key<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-visibility &lt;vis&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">(Optional) Specifies a visibility token to apply to all rows inserted into Accumulo. Default is the empty string.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-batch-size &lt;size&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">(Optional) Sets the size in bytes of Accumulo\u2019s write buffer. Default is 4MB.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-max-latency &lt;ms&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">(Optional) Sets the max latency in milliseconds for the Accumulo batch writer. Default is 0.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-zookeepers &lt;host:port&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Comma-separated list of Zookeeper servers used by the Accumulo instance<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-instance &lt;table-name&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Name of the target Accumulo instance<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-user &lt;username&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Name of the Accumulo user to import as<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;accumulo-password &lt;password&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Password for the Accumulo user<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>i. Importing Data Into Accumulo<\/h4>\n<p><span style=\"font-weight: 400\">Basically, into a table in Accumulo Sqoop supports importing records.<\/span><br \/>\n<span style=\"font-weight: 400\">In addition,\u00a0we can instruct Sqoop to import to a table in Accumulo rather than a directory in <a href=\"https:\/\/data-flair.training\/blogs\/rack-awareness-hadoop-hdfs\/\"><strong>HDFS<\/strong><\/a> by specifying &#8211;accumulo-table. Moreover, Sqoop will import data to the table specified as the argument to &#8211;accumulo-table.\u00a0<\/span><\/p>\n<p>Again it is very important to note that this function is incompatible with direct import (parameter &#8211;direct). Also, it cannot be used in the same operation as an HBase import.<br \/>\n<strong>Table 8. Code generation arguments<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Argument<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;bindir &lt;dir&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Output directory for compiled objects<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;class-name &lt;name&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Sets the generated class name. This overrides &#8211;package-name. When combined with &#8211;jar-file, sets the input class.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;jar-file &lt;file&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Disable code generation; use specified jar<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;outdir &lt;dir&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Output directory for generated code<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;package-name &lt;name&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Put auto-generated classes in this package<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;map-column-java &lt;m&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Override default mapping from SQL type to Java type for configured columns.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Basically, the class is typically named after the partitioned dataset name. Since a partitioned dataset named foo will generate a class named foo. It is possible that we may want to override this class name.<br \/>\n<strong>For example,<\/strong> if our partitioned dataset is named EMPLOYEES,\u00a0we want to specify &#8211;class-name employee instead. In this way, we can specify just the package name with &#8211;package-name.<\/p>\n<p><span style=\"font-weight: 400\">Here, the following import generates a class named com.foocorp.SomePDS:<\/span><br \/>\n$ sqoop import-mainframe &#8211;connect &lt;host&gt; &#8211;dataset SomePDS &#8211;package-name com.foocorp<br \/>\n<span style=\"font-weight: 400\">While we run sqoop, the .java source file for our class will be written to the current working directory. Also,\u00a0with &#8211;outdir\u00a0we can control the output directory.<\/span><br \/>\n<strong> For example, <\/strong><br \/>\n&#8211;outdir src\/generated\/.<br \/>\n<span style=\"font-weight: 400\">Moreover, the import process compiles the source into .class and .jar files; these are ordinarily stored under \/tmp. Also, with &#8211;bindir\u00a0we can select an alternate target directory.<\/span><br \/>\n<strong> For example,<\/strong><br \/>\n&#8211;bindir \/scratch.<br \/>\n<span style=\"font-weight: 400\">If you already have a compiled class that can be used to perform the import and want to suppress the code-generation aspect of the import process, you can use an existing jar and class by providing the &#8211;jar-file and &#8211;class-name options. <\/span><br \/>\n<strong>For example,<\/strong><br \/>\n$ sqoop import-mainframe &#8211;dataset SomePDS &#8211;jar-file mydatatypes.jar \\<br \/>\n&#8211;class-name SomePDSType<br \/>\n<span style=\"font-weight: 400\">Basically, this command will load the SomePDSType class out of mydatatypes.jar.<\/span><\/p>\n<h4>j. Additional Import Configuration Properties<\/h4>\n<p><span style=\"font-weight: 400\">There are some additional properties which can be configured by modifying conf\/sqoop-site.xml. Properties can be specified the same as in<strong><a href=\"https:\/\/data-flair.training\/blogs\/how-hadoop-works-internally\/\"> Hadoop<\/a> <\/strong>configuration files.<\/span><br \/>\n<strong>For example<\/strong><br \/>\n&lt;property&gt;<br \/>\n&lt;name&gt;property.name&lt;\/name&gt;<br \/>\n&lt;value&gt;property.value&lt;\/value&gt;<br \/>\n&lt;\/property&gt;<br \/>\n<span style=\"font-weight: 400\">Moreover, in the generic arguments, we can also specify it on the command line. <\/span><br \/>\n<strong>For example<\/strong><br \/>\nsqoop import -D property.name=property.value \u2026<\/p>\n<h3>Sqoop Import Mainframe Tool &#8211; Example Invocations<\/h3>\n<p><span style=\"font-weight: 400\">Here, an example below shows that how to use the import tool in a variety of situations.<\/span><br \/>\n<span style=\"font-weight: 400\">However, in the mainframe host z390, a basic import of all sequential files in a partitioned dataset named EMPLOYEES:<\/span><br \/>\nFor example,<br \/>\n$ sqoop import-mainframe &#8211;connect z390 &#8211;dataset EMPLOYEES \\<br \/>\n&#8211;username SomeUser -P<br \/>\nEnter password: (hidden)<br \/>\n<span style=\"font-weight: 400\">Moreover, <strong>Controlling the import parallelism (using 8 parallel tasks):<\/strong><\/span><br \/>\n$ sqoop import-mainframe &#8211;connect z390 &#8211;dataset EMPLOYEES \\<br \/>\n&#8211;username SomeUser &#8211;password-file mypassword -m 8<br \/>\n<span style=\"font-weight: 400\">Afterwards, <strong>Importing the data to Hive:<\/strong><\/span><br \/>\n$ sqoop import-mainframe &#8211;connect z390 &#8211;dataset EMPLOYEES \\<br \/>\n&#8211;hive-import<\/p>\n<h3>Conclusion<\/h3>\n<p>As a result, we have seen the whole concept of\u00a0Sqoop import mainframe tool. Also, we have seen Sqoop import mainframe examples to understand well. Moreover, we have seen all the arguments associated with this tool. Also, we have learned its syntax to use it easily.<\/p>\n<p>Still, if you want to ask any query regarding, feel free to ask in the comment section.<br \/>\nSee Also- <a href=\"https:\/\/data-flair.training\/blogs\/sqoop-validation\/\"><strong>Sqoop Validation<\/strong><\/a> &amp; <a href=\"https:\/\/data-flair.training\/blogs\/best-sqoop-books\/\"><strong>Best Sqoop Books<\/strong><\/a><br \/>\n<a href=\"http:\/\/sqoop.apache.org\/\"><strong>For reference<\/strong><\/a><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2028,&quot;href&quot;:&quot;http:\\\/\\\/sqoop.apache.org&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20250925155903\\\/https:\\\/\\\/sqoop.apache.org\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-10 22:16:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-13 23:03:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-17 06:30:42&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-20 10:18:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-24 02:01:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-27 19:00:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-30 19:52:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 23:02:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-06 11:12:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-11 07:39:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-14 14:00:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-19 20:14:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-23 07:39:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-26 22:35:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-02 09:53:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-09 06:23:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-12 18:07:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-16 05:01:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 15:46:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 20:42:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 19:22:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-06 04:01:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-10 04:30:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 11:20:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-20 07:53:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-23 12:38:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 03:58:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 07:44:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-06 10:04:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-09 14:27:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 16:47:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 15:59:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-26 17:43:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-30 00:21:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-04 07:58:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-07 14:39:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-12 19:37:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-17 18:39:42&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-21 10:10:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-26 11:21:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-01 06:33:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-05 02:07:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-10 06:22:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-14 04:14:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-18 03:31:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-21 19:29:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-25 17:04:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-29 06:32:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-02 14:31:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-06 12:01:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-09 21:39:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-13 05:53:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-16 16:20:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-19 23:26:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-23 14:38:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-27 08:07:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-02 06:39:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-06 09:03:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-09 17:40:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-14 05:02:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-17 15:24:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-20 20:21:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-24 16:51:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-28 13:17:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-31 20:30:32&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-08-31 20:30:32&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While it comes to import all sequential datasets in a partitioned dataset (PDS) on a mainframe to HDFS we use Sqoop import mainframe tool. Apart from\u00a0Sqoop import mainframe tool&#8217;s introduction, there is much more&#46;&#46;&#46;<\/p>\n","protected":false},"author":9,"featured_media":7618,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[68],"tags":[2899,2972,2974,2975,4674,6639,6640,6641,12712,13638],"class_list":["post-7552","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sqoop","tag-connecting-to-a-mainframe","tag-controlling-distributed-cache","tag-controlling-parallelism","tag-controlling-the-import-process","tag-file-formats","tag-importing-data-into-accumulo","tag-importing-data-into-hbase","tag-importing-data-into-hive","tag-selecting-the-files-to-import","tag-sqoop-import-mainframe-tool"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn Sqoop Import Mainframe Tool - Syntax and Examples - DataFlair<\/title>\n<meta name=\"description\" content=\"Sqoop import mainframe tool-purpose &amp; syntax of mainframe tool in Sqoop Import, examples of sqoop import-mainframe tool, Importing Data Into Hbase &amp; Hive\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn Sqoop Import Mainframe Tool - Syntax and Examples - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Sqoop import mainframe tool-purpose &amp; syntax of mainframe tool in Sqoop Import, examples of sqoop import-mainframe tool, Importing Data Into Hbase &amp; Hive\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-08T13:48:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-07T07:18:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Introduction-to-Sqoop-import-mainframe-tool-01-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn Sqoop Import Mainframe Tool - Syntax and Examples - DataFlair","description":"Sqoop import mainframe tool-purpose & syntax of mainframe tool in Sqoop Import, examples of sqoop import-mainframe tool, Importing Data Into Hbase & Hive","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/","og_locale":"en_US","og_type":"article","og_title":"Learn Sqoop Import Mainframe Tool - Syntax and Examples - DataFlair","og_description":"Sqoop import mainframe tool-purpose & syntax of mainframe tool in Sqoop Import, examples of sqoop import-mainframe tool, Importing Data Into Hbase & Hive","og_url":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-02-08T13:48:31+00:00","article_modified_time":"2021-12-07T07:18:11+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Introduction-to-Sqoop-import-mainframe-tool-01-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/6e11a88eea98179e861a0933f8959f8f"},"headline":"Learn Sqoop Import Mainframe Tool &#8211; Syntax and Examples","datePublished":"2018-02-08T13:48:31+00:00","dateModified":"2021-12-07T07:18:11+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/"},"wordCount":2572,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Introduction-to-Sqoop-import-mainframe-tool-01-1.jpg","keywords":["Connecting to a Mainframe","Controlling Distributed Cache","Controlling Parallelism","Controlling the Import Process","File Formats","Importing Data Into Accumulo","Importing Data Into HBase","Importing Data Into Hive","Selecting the Files to Import","Sqoop import-mainframe tool"],"articleSection":["Sqoop Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/","url":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/","name":"Learn Sqoop Import Mainframe Tool - Syntax and Examples - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Introduction-to-Sqoop-import-mainframe-tool-01-1.jpg","datePublished":"2018-02-08T13:48:31+00:00","dateModified":"2021-12-07T07:18:11+00:00","description":"Sqoop import mainframe tool-purpose & syntax of mainframe tool in Sqoop Import, examples of sqoop import-mainframe tool, Importing Data Into Hbase & Hive","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Introduction-to-Sqoop-import-mainframe-tool-01-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Introduction-to-Sqoop-import-mainframe-tool-01-1.jpg","width":1200,"height":628,"caption":"What is Sqoop Import Mainframe tool"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/sqoop-import-mainframe\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Chracteristics of Impala Hadoop","item":"https:\/\/data-flair.training\/blogs\/tag\/chracteristics-of-impala-hadoop\/"},{"@type":"ListItem","position":3,"name":"Learn Sqoop Import Mainframe Tool &#8211; Syntax and Examples"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/6e11a88eea98179e861a0933f8959f8f","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/54363d8635c383dcd7e3be0ef00dbeef4217c45bf323d27bc2c92366b724df08?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/54363d8635c383dcd7e3be0ef00dbeef4217c45bf323d27bc2c92366b724df08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/54363d8635c383dcd7e3be0ef00dbeef4217c45bf323d27bc2c92366b724df08?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"At DataFlair, our team of experts is committed to offering high-quality tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We simplify learning to help you advance your career in the tech world.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam5\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/7552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=7552"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/7552\/revisions"}],"predecessor-version":[{"id":105330,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/7552\/revisions\/105330"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/7618"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=7552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=7552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=7552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}