---------- Forwarded message ---------- From: Ajana Chandiruthil Sathian <[email protected]> Date: Wed, Nov 15, 2017 at 11:09 AM Subject: Upsert option in Sqoop export command. To: [email protected]
To whom ever it may concern, I have a csv file in Hadoop and I did Sqoop export to Oracle. The column data type order in ODS is number,date, date,float,varchar and the column data type in the csv file is number,date, float,date,varchar and I used the --columns sqoop argument to get control in column ordering and it worked. But I could not control the column ordering when I was doing the upsert operation in sqoop export. It is giving me misalignment in ODS after Sqoop( please see the attached image). The below given is the sqoop command: sqoop export --connect ConnectionString \ --username xxx \ --password xxxx \ --table tableName \ --export-dir /dir/TestUpdate.txt \ --input-fields-terminated-by ',' \ --lines-terminated-by '\n' \ --update-key column_name \ --update-mode allowinsert \ --columns "id,START_DT,VAL,end_DT,QUALITY" \ -m 4
