2
votes

We are using apache Sqoop to offload data from Teradata system to Hive tables in Hortonworks platform using Hortonworks Connector for Teradata.

We are trying to create Hive table in Teradata from Sqoop using the Sqoop command "create-hive-table". The process is working fine if there are no Interval/Period data type in Teradata but failing(Error: unsupported data type) if the table contains a interval/period data type. I have also tried to use the "hive-import" option but it is not working if the table is not created before. Did anybody face this issue while using the Hortonworks Connector For Teradata. Please note I am facing such problem only when there is a interval/period type present in table..

2
share your sqoop command and the data type from teradata. - Sathiyan S

2 Answers

0
votes

@Sathiyan S

Here you go

Sqoop Command

sqoop create-hive-table --connection-manager org.apache.sqoop.teradata.TeradataConnManager --connect jdbc:CONNECSTRING --username dummy --password dummypd --map-column-hive Employee_Duration_Interval=STRING,Employee_work_period=STRING --table TEST_TABLE_TD --hive-table HIVE_TEST_TABLE

TEST_TABLE_TD ( Employee_id INTEGER, Employee_Name VARCHAR(200), Employee_Duration_Interval INTERVAL YEAR(4) TO MONTH, Employee_work_period PERIOD(TIMESTAMP(6)) )

Please let me know if you need any other information. Regards, Indranil Roy

0
votes

Try with --map-column-java, coz no datatype can be matched with interval/period in java,

so the query would be similar to this,

sqoop create-hive-table --connection-manager org.apache.sqoop.teradata.TeradataConnManager --connect jdbc:CONNECSTRING --username dummy --password dummypd --map-column-hive Employee_Duration_Interval=STRING,Employee_work_period=STRING --map-column-java Employee_Duration_Interval=String,Employee_work_period=String --table TEST_TABLE_TD --hive-table HIVE_TEST_TABLE