Reputation: 39
I use sqoop to dial with my TD database. When i try this, everything is OK (my table is create in default hive database)
sqoop import \
-libjars $LIB_JARS \
-Dteradata.db.input.job.type=hive \
-Dteradata.db.input.target.table=hive_table \
-Dteradata.db.input.target.table.schema="c1 bigint" \
-m 1 \
--connect jdbc:teradata://PRD/Database=database \
--connection-manager org.apache.sqoop.teradata.TeradataConnManager \
--username userTD \
--password passTD \
--table tableTD
But when i try to specify another hive database with :
-Dteradata.db.input.target.database=hive_database \
The script return OK, the table is create but without any data inside...
Need somme help...
Thanks
Upvotes: 0
Views: 4214
Reputation: 189
Could you be running into the below issue noted by Hortonworks? You could land the table in one database and then run an INSERT OVERWRITE to write the table into another database.
From Hortonworks:
Sqoop Teradata connector option teradata.db.input.target.database does not work.
The Teradata Hadoop Connector used by Sqoop connector uses incorrect Hive database name while loading rows into Hive tables.
The workaround is to use default Hive database for Hive imports.
Upvotes: 3