Forum Discussion

Luigia-Costabil's avatar
Luigia-Costabil
Icon for Advocate I rankAdvocate I
2 months ago
Solved

Azure Synapse Link for Dataverse to Fabric - CSV management

Hi Community, I'm evaluating Azure Synapse Link (Append Only) as the ingestion layer for a Microsoft Fabric Medallion Architecture and I'm trying to better understand how the exported CSV files shou...
  • v-dineshya's avatar
    v-dineshya
    2 months ago

    Hi Luigia-Costabil , Thank you for reaching out to the Microsoft Community Forum.

    1. Do I need Synapse SQL pool to get delta?

    You do NOT need Synapse SQL Pool to get delta (CDC) from Synapse Link (Append Only). You already have the delta in CSV form.

    2. How do I consume delta without Synapse?

    You read files incrementally from ADLS. Use columns like IsDelete and timestamps (SinkCreatedOn, modifiedon). Reconstruct CDC yourself in Fabric.


    Please refer below sample code.

    df = spark.read.csv("adls_path", header=True)

    # Deduplicate by key + timestamp
    windowed_df = (
    df.withColumn("rn",
    row_number().over(
    Window.partitionBy("primaryKey")
    .orderBy(col("SinkCreatedOn").desc())
    )
    )
    .filter("rn = 1")
    )

    Note: This is exactly what Synapse SQL pool would have done for you but you are doing it in Fabric (cheaper + more control).

    Please try below Architecture.

    1. Synapse Link (Append Only) --> Cheap ingestion and Full CDC
    2. ADLS Gen2 (CSV, cheap storage) 
    3. Fabric Shortcut --> No data duplication and Direct access
    4. Bronze Delta tables --> Reliability, Performance and Fabric-native
    5. Silver (SCD2)

    Note:  Do NOT use Synapse SQL pool.

     

    I hope this information helps. Please do let us know if you have any further queries.

     

    Regards,

    Dinesh