I need to update the Status
columns for the first 2 rows in Original_Table
where Mobiles = 0
for which I am following the this solution and am getting an error.
I am running the queries/updates on a Databricks Notebook and using %sql magic command to run the query.
Original_Table
is a Table I created on the Databricks Cluster
My sql code:
WITH New_Table as (SELECT * FROM Original_Table WHERE Mobiles = 0 ORDER BY Row_ID LIMIT 2)
UPDATE New_Table SET Status = 1
The error with above code is shown below:
Error in SQL statement: AnalysisException: UPDATE destination only supports Delta sources.
This question is possibly answering the same issue , but I am unsure about how to implement it in my piece of code , where my Aim is to UPDATE the first 2 rows where Mobiles = 0