Hi,
I have a requirement where I need to compare the value that exists in a source table i.e. in Teradata vs the data that I am pulling into, the destination table, i.e. Hadoop.
I do know that there is a way to load the value into a textfile in HDFS, but am unable to store the value into a variable.
This is what I have done this far:
MYVAL=$(sqoop eval \
-libjars $LIB_JARS -Dteradata.db.input.job.type=hive \
--connect "jdbc:teradata://XXXXXXx" \
--username XXXXXX \
--password XXXXX \
--query "select count(*) from database_name.table_name | awk'/([0-9]+)/{print $2}');")
var=`env -i hive -S -e "select count(*)from database_name.table_name ;"`
echo $MYVAL
echo $var