I am trying to import all the tables from several SQL Server databases into HDFS using Sqoop. I am using Cloudera CDH 5.7. So I type the following command:
sqoop import-all-tables --connect "jdbc:sqlserver://X.X.X.X:1433;database=FEPDB" --username XXXXX --password XXXXX --hive-import
It runs successfully but all the tables present in the 'FEPDB' Database are not being imported. I don't find them in the hive directory in the HDFS or when I list all the tables present in Hive.
So I tried to import all the tables into a directory in HDFS and then create hive tables. I gave the following command:
sqoop import-all-tables --connect "jdbc:sqlserver://X.X.X.X:1433;database=FEPDB" --username XXXXX --password XXXXX --target-dir "/user/FEPDB"
It gives me an error saying
unrecognized argument --target-dir
Doesn't --target-dir argument work with import-all-tables command? And why are all the tables from a database not being imported in the first place? Is there a way to get past these errors and import all the tables in a much easier way?
Any help would be appreciated. Thank you.