database connection - Teradata: Difference between ANSI and TERA modes with respect to record insertion -
i working on application takes records hadoop , inserts them teradata via sqoop(jdbc).
i using tera mode connection , target table set table. getting duplicate row issue datasets.
as far know tera mode supposed ignore duplicate records while doing inserts. can please confirm behavior?
for set table in tera mode in teradata there 2 scenarios:
1.) set table table_name(which throw duplicate row exception):
insert dbname.table_name(id,name) values(1,'mukesh'); //success insert dbname.table_name(id,name) values(1,'mukesh'); //failure insert dbname.table_name(id,name) values(1,'mukesh'); //failure
in tera mode not case sensitive, treats records same. , throw duplicate row exception.
2.) set table table_name(which not throw duplicate row exception):
insert dbname.table_name(id,name) select id,name dbname.table_name2;
if there records in dbname.table_name2 in table dbname.table_name , if try execute above query, ignores duplicate row exception , not insert table dbname.table_name.
also in ansi mode, there duplicate row exception both above scenarios.
Comments
Post a Comment