Created 01-30-2019 04:16 PM
Hi
Please Provide the solution for Importing all tables from SQL to hive
Created 01-30-2019 05:41 PM
@Nethaji R You can use a single sqoop command. https://data-flair.training/blogs/sqoop-import-all-tables/
Created 01-31-2019 12:19 PM
Hi
I have a Query like this,
sqoop import --driver=com.microsoft.sqlserver.jdbc.SQLServerDriver --connect “jdbc:sqlserver://XX.XX.XXX:1433; database=PTWTarget” --username sa --P --table ActionItems --create-hive-tables --target-dir /sqltohive/actionitems --hive-import -m 1
when i execute, i'm getting error in TCP/IP connection had refused.
Created 01-31-2019 06:39 PM
When you are running the sqoop command for importing all tables ie the whole database then you shouldn't have
[--table ] parameter in your command they are mutually exclusive.
Sqoop will assume your destination database will have the same name as the source
sqoop import-all-tables --driver=com.microsoft.sqlserver.jdbc.SQLServerDriver \ --connect jdbc:sqlserver://XX.XX.XXX:1433; database=PTWTarget \ --username username \ --password password -- \ --schema the_schema \ --hive-database PTWTarget --hive-import
HTH
Created 01-31-2019 07:02 PM
sqoop import-all-tables --driver=com.microsoft.sqlserver.jdbc.SQLServerDriver --connect jdbc:sqlserver://XX.XX.XXX:1433; database=PTWTarget --username ML_Testing --password Admin --hive-database PTWTarget --hive-import
I tried like this but i'm getting error, please validate my code and provide me solution
Error: java.lang.RuntimeException: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host x.x.x.x, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
Created 01-31-2019 08:10 PM
The default database port for sql server is 1433 can you validate that the hostname and port are correct from your DBA or Firewall setting block your node/IP ?
Can you add quotes like below note the single quote and removal of space between the port1433 and database. copy and pas to see if that works
sqoop import-all-tables --driver=com.microsoft.sqlserver.jdbc.SQLServerDriver --connect 'jdbc:sqlserver://XX.XX.XXX:1433;database=PTWTarget' --username 'ML_Testing' --password 'Admin' --hive-database PTWTarget --hive-import
HTH
Created 02-24-2019 02:19 AM
Any updates did my response resolve the issue or answer your question if so accept so the thread is marked as closed.