Copy Data Activity

Aditya Singh 160 Reputation points
2024-02-12T11:59:35.11+00:00

I want to copy data (table) from Azure SQL Database Managed Instance linked service to a blob storage(ADLS GEN2) in delta format using Copy data activity in the pipeline section in Azure Synapse analytics? I only get this options
User's image

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
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.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Amira Bedhiafi 41,121 Reputation points Volunteer Moderator
    2024-02-12T15:45:48.6566667+00:00

    You'd typically need to use a Spark activity after the data copy to read the data and then write it back in delta format.

    After copying the data, you can use an Azure Synapse Spark pool to convert the data into delta format. Here’s a rough guide on how you might do this:

    • Add a new Spark notebook or Spark job in your Synapse workspace.
    • Read the parquet files into a Spark DataFrame.
    • Write out the DataFrame in delta format using the .format("delta") option in the DataFrame writer.

    You can automate this process by creating a pipeline that includes both the Copy Data activity followed by the Spark job or notebook activity.

    # Read the Parquet files into a DataFrame
    df = spark.read.format("parquet").load("path/to/your/staging/parquet/files")
    # Write out the DataFrame in Delta format
    df.write.format("delta").save("path/to/your/final/delta/output")
    
    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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