Immutable Storage with Spark Delta Table

Abhiram Duvvuru 236 Reputation points Microsoft Employee
2023-01-10T04:42:34.34+00:00

Hi Team - We want to process data from source system on daily cadence using spark and store the data as delta table in ADLS Gen2 in immutable state . Is there way to add constraint/enforce delta table to always append data from source i.e If uses/application tries to delete the data from delete table , it should throw error. Please let me know to how to achieve it.

In addition, I have looked into storage immutability at the container level and enabled legal hold but delta write in not working on subsequent write ( i.e Step1: read data from source for Day 1 and write to delta table Step2: Enable Immutability at container level Step3: read from source for Day2 and append to delta table (below error) 277704-image.png 277658-erros.jpg

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bhargava-MSFT 31,261 Reputation points Microsoft Employee Moderator
    2023-01-25T18:43:01.7433333+00:00

    <Update>

    The expected behavior with immutable blobs, we should be able to create new files on the immutable blobs, but we can't append/modify the data on the existing files.

    Current behavior: Immutable works only when we upload the files manually, but we cannot create any new files on the Immutable blobs when using the synapse notebook. This is with delta as well as for parquet writes.

    Error message: we will see the below error when using synapse notebook

    "This operation is not permitted as the path is immutable due to one or more legal holds"

    The product team is currently looking into the issue. I will update this thread as soon as I hear from them.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.