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