sqoop Connecting Sqoop to other databases/datastores Import table to new catalog


Example

To import data from SQL Server to Hadoop:

sqoop import --table TestTable
             --connect "jdbc:sqlserver://192.168.1.100:1433;database=Test_db"  
             --username user 
             --password password  
             --split-by id  
             --target-dir /user/test
  • split-by – used mandatory if no primary key
  • target-dir – new catalog, which does not exist yet