'How to import Teradata table into HIVE using HUE?
I need help importing a Teradata table (with LDAP credentials) into HIVE using HUE interface. I'm new to HIVE and has very little knowledge. Also, the import needs to be a fresh load and not append.
Thank you.
Solution 1:[1]
Ask your admin for access to sqoop.
First of all create a table mytable just like source table.
Use below command when you are using a SQL to extract data. i used oracle as example. for teradata you will get some jdbc driver
sqoop import --connect jdbc:oracle:thin:@host:port/service_name --username xx --password yy --target-dir 'hdfs://your/table1/ --query "select * from scott.mytable where emp_id =1 AND \$CONDITIONS" --hive-import --hive-drop-import-delims --hive-database mydb --hive-table mytable1 --hive-overwrite --delete-target-dir --m 1
Use below SQL if you want to extract complete table without any filter.
sqoop import --connect jdbc:oracle:thin:@host:port/service_name --username xx --password yy --target-dir 'hdfs://your/table1/ --hcatalog-database mydb --hcatalog-table mytable1 --table mytable --hive-import --hive-drop-import-delims --hive-overwrite --delete-target-dir --m 1
Pls note, there can be many options to sqooop, you need to add or remove parameters.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Koushik Roy |
