I have a Oracle table where the data is like below -
select * from test
GRP_ID GRP_NM MRG_ID
0024 Abac Expl 17
0027 Wlsy Inc 8404
I have a dataframe where the updated data is like below -
print(df)
grp_id grp_nm mrg_id
0 0024 Abac Sol 17
1 0027 Wlsy Inc 8407
2 0029 Xyz Corp 1986
I want to update oracle table grp_id 0024 and 0027 with the updated value of grp_nm and mrg_id from dataframe. Also want to insert new grp_id 0029 into table. Could you please help?
Constraints: I do not have oracle db access so i can not create a temp table from df and then update test table from temp table. Also , this is just sample data. I have almost 200K rows to process.
Expected Output :
sql > select * from test;
GRP_ID GRP_NM MRG_ID
0024 Abac Sol 17
0027 Wlsy Inc 8407
0029 Xyz Corp 1986