Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 04-20-2017 08:09 PM - edited 09-16-2022 04:29 AM
I'm trying to use the --query option in sqoop to import data from MSSQL. My concern is, how can we declare which schema to use ung --query in MSSQL.
My script:
sqoop \
--options-file sqoop/aw_mssql.cfg \
--query "select BusinessEntityId, LoginID, cast(OrganizationNode as string) from Employee where \$CONDITIONS" \
--hive-table employees \
--hive-database mssql \
-- --schema=HumanResources
Still produces an error "Invalid object name 'Employee'".
Also tried --connect "jdbc:sqlserver://192.168.1.17;database=AdventureWorks;schema=HumanResources" but also failed.
Created 04-21-2017 07:22 AM
Have you tried this?
select col1, col2 from HumanResources.Employee
Created 04-21-2017 07:22 AM
Created 04-26-2017 02:01 AM