0

General EXTERNAL table like Oracle doesn't allow Insert/Update operation. But Databricks EXTERNAL Delta Table enables Update/Insert operation. This way I can see a flaw, or is there anyway to stop that? Example -

CREATE TABLE employee
USING DELTA
LOCATION '/mnt/ADLS/employee'
PARTITIONED BY (date)

This will create an External table of employee loading data from /mnt/ADLS/employee. Now if I again create another External table say employee_new and do an INSERT it will get reflected to actual employee table. Is there anyway to stop this?

Anirban Nag 'tintinmj'
  • 5,572
  • 6
  • 39
  • 59
  • Anirban, I'm not sure of exactly what youre asking. If you insert into separate tables, of course it wont be reflected in other tables. This is not unique to delta lake. This is common across all technologies. – Joe Widen Jun 20 '19 at 04:51
  • @JoeWiden 1) does other technologies allow Update in External table? 2) If I insert to two different tables but those two tables pointing to same location, any update will be reflecting to both the tables. – Anirban Nag 'tintinmj' Jun 29 '19 at 10:15
  • Today no other technologies can update delta tables that I know of. If you try to write to two different delta tables at the same location, this wont work as there would have to be two delta logs, one for each table. If they both are views ontop of the same delta table, and then you write to the singular delta table, then the views will be updated next time the queries are ran. – Joe Widen Jun 29 '19 at 20:24
  • @JoeWiden what I am talking about is External Table not View. – Anirban Nag 'tintinmj' Jun 29 '19 at 20:45

0 Answers0