TDCH to Hive inserts NULL values

Hadoop
Teradata Employee

TDCH to Hive inserts NULL values

I have been trying to import Teradata Tables into Hive using the TDCH utility. The utility seems to be working fine since the connection is successful. However after the job completes and when I check the values in the respective hive table I get all NULL values. The separator and delimiters are fine. So either it's not able to fetch the data properly or there seems to be some problem with my TDCH code. Please find below my TDCH code and let me know what the possible problem might be:-

$Prefix $Start_Date and $End_Date are the arguments to my script in which this TDCH snippet is. Also $Prefix is the name of the source table in Teradata DB

hadoop jar $TDCH_JAR com.teradata.connector.common.tool.ConnectorImportTool \

        -Ddfs.blocksize=134217728 \

        -libjars $HIVE_LIB_JARS \

        -classname com.teradata.jdbc.TeraDriver \

        -url jdbc:teradata://xxxxxx/DATABASE=xxxx \

        -username xxxx \

        -password $PASS \

        -jobtype hive \

        -fileformat orcfile  \

        -method split.by.hash \

        -sourcequery "SELECT $SRC_FIELDS FROM $Prefix WHERE CAST(xxxxxx AS DATE)>=${Start_Date} AND CAST(xxxxxx AS DATE) <=${End_Date}" \

        -nummappers 2 \

        -separator ',' \

        -targetdatabase vijit \

        -targettable $Curr_Table_Name \

        -targetfieldnames "$TGT_FIELDS" 2>&1 | tee -a $Log_File

1 REPLY
Teradata Employee

Re: TDCH to Hive inserts NULL values

From the TDCH command that you have written I can not determine what would be going wrong.  What version of TDCH are you using?  Also, would it be possible to send the command line output when TDCH is run?  

 

Best regards,

 

Sean Dorval

TDCH Development