AssertionError: assertion failed: Unable to delete the record but I am able to select it though
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2021 09:45 AM
Is there any reason this command works well:
%sql
SELECT * FROM datanase.table WHERE salary > 1000
returning 2 rows, while the below:
%sql
delete FROM datanase.table WHERE salary > 1000
Error
Error in SQL statement: AssertionError: assertion failed: No plan for DeleteFromTable
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2021 09:45 AM
DELETE FROM (and similarly UPDAT. aren't supported on the Parquet files - right now on Databricks, it's supported for Delta format. You can convert your parquet files into delta using CONVERT TO DELTA, and then this command will work for you.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2021 12:02 AM
Have multiple questions on converting to delta.
- When I tried to covert as DELTA, then I cant access the parquet files using spark.read.parquet
- If converted to delta, then i ran a delete command for a filter example> where id = 1001. After the query execution, this data for id 1001 will be deleted from the underlying files or it will present, but not returned when running query