I have created two Databricks Delta sources as follows using Databricks SQL as follows:
create table if not exists basef1area.races using delta
options ('header' = 'true')
location "/FileStore/tables/races.csv"
create table if not exists basef1area.drivers using delta
options ('header' = 'True')
location "/FileStore/tables/drivers.csv"
I am attempting to carry out a merge as follows:
CREATE OR REPLACE TEMP VIEW rs AS
SELECT *, ROW_NUMBER() OVER (ORDER BY rand()) AS seq
FROM basef1area.drivers;
MERGE INTO basef1area.races AS t
USING rs
ON t.race_ID = rs.seq
WHEN MATCHED THEN
UPDATE SET t.reject_reason = rs.driver_ID;
When I attempt the merge I get the following error:
Error in SQL statement: AnalysisException: MERGE destination only supports Delta sources.