You are using the below command to load data to your table.
load data local inpath "txns.txt" overwrite into table txnrecords;
The above command is used to load data from local to the hive table. But if your data set is present in the hdfs, you need to use the above command without the clause local i.e,
load data inpath "txnx.txt" overwrite into table txnrecords;