Update Synapse Analytics Table from Databricks

MASSIMO CAULI 61 Reputation points
2021-05-28T13:51:41.177+00:00

Is it possible to update a table of Synapse Analytics (Data Warehouse) from Azure Databricks?
Apparently using Pyspark, Scala or SparkR there is no update option. Besides, using Spark SQL the Update syntax does not work.

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.
4,395 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,938 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 77,751 Reputation points Microsoft Employee
    2021-05-31T06:22:57.42+00:00

    Hello @MASSIMO CAULI ,

    Welcome to the Microsoft Q&A platform.

    You can update the Azure Synapse Analytics tables from Azure Databricks using overwrite mode.

    Overwrite mode means that when saving a DataFrame to a data source, if data/table already exists, existing data is expected to be overwritten by the contents of the DataFrame.

    As per the repro, I'm able to update the Azure Synapse Analytics Table from Azure Databricks.

    Reading the table data from Azure Synapse Analytics using Azure Databricks:

    100982-image.png

    Inserting the data into table of Azure Synapse Analytics

    100991-image.png

    Updating the columns in the table of Azure Synapse Analytics

    101001-image.png

    Hope this helps. Do let us know if you any further queries.

    ---------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful