Hi All,

Senario: update existing row based on column value in a table, this is how
is do in SPARK SQL, i'm i doing right? is there any better way to do it in
spark sql?

1. Table (zeppelin-report) row should be updated based on column value

1. select * from table1 where id not in(select id from table1)
(filter the row that need to be updated)
SaveMode.Append (tableB) temp table

2. read new row and append to above table
SaveMode.Append (tableB) temp table

3. SaveMode.Overwrite(zeppelin-report)
This zeppelin report table data is dropped

4.save tableB as Zeppelin-report table

5.SaveMode.Overwrite(tableB)
drop the value of temp table for reuse


Suresh Ayyavoo

Solution Architect / R&D Lead

iAPPS Pte. Ltd.

3 Fusionopolis Way, Symbiosis #13-25 S(138633)

[O] 64631795   [F] 6778 5300 [M] 91540224

Website: www.iappsasia.com

Facebook: www.facebook.com/iappsasia

Youtube: www.youtube.com/user/iAPPSasia

Reply via email to