Forum Discussion

J-Schreck's avatar
J-Schreck
New Member
1 year ago
Solved

SQL CDC to Fabric

Scenario: On-prem SQL db with CDC logging enabled  Fabric is all setup    Connections to the SQL db is all good but when I try to use the LSN values __$Start_LSN for referance for the CDC inges...
  • v-sgandrathi's avatar
    1 year ago

    Hello J-Schreck,

     

    The challenge with __$Start_LSN values appearing in binary format is expected behavior within SQL Server CDC. Since Fabric doesn’t handle this format directly, a practical approach is to convert the binary LSN values into a readable format (such as hexadecimal or timestamps) using SQL Server’s built-in functions, like CONVERT() or sys.fn_cdc_map_lsn_to_time()
    sys.fn_cdc_map_lsn_to_time (Transact-SQL) - SQL Server | Microsoft Learn.

     

    For periodic CDC ingestion — given that real-time processing isn’t a requirement — Dataflows Gen2 or Data Factory pipelines are effective solutions within Fabric. These methods support scheduled data pulls and transformations.

     

    To ensure you capture only new changes, I recommend tracking the last processed LSN in a Fabric table and using it as a reference point to fetch only incremental data on each load.

    This approach should resolve the binary LSN issue and ensure smooth, repeatable CDC ingestion into Fabric.

     

    I hope this could resolve you issue, if you need any further assistance, feel free to reach out.

    If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

     

    Thank you for using Microsoft Community Forum.