Forum Discussion

AndreaTosti's avatar
AndreaTosti
New Member
1 year ago
Solved

Warehouse git integration auto generated metadata

I noticed that as of February 12, 2025, the git integration for a Warehouse introduced a new line, in the .sql files (which I can find on the git repository linked to a Fabric workspace) like the following:

 

 

warehouse_name.Warehouse/dbo/Views/MyView.sql


-- Auto Generated (Do not modify) 03638K95VLFDLM8XCCDG3A5IOR8EN05Q8DIEFEEI0PKR5L4MKGA20EE9LL4BM7ZA

 

I would like to be able to retrieve such a 64-character SHA from an API or be able to generate it locally from a string.

  • I know this is already marked as solved, but I would like to point out that MS Fabric stored procedures and views do not save comments before the CREATE key word in the data warehouse. So, while Microsoft generates this comment, it is not ultimately saved as part of the data warehouse view.

    The result is that the data warehouse and the git file are always out-of-synch when comparing in VS Code schema compare. We are currently just ignoring that difference, but it would be very helpful if either comments would be recognized before the CREATE or if schema compare accounted for this extra auto-generated comment from MS Fabric. 

4 Replies

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi AndreaTosti , Thank you for reaching out to the Microsoft Community Forum.

     

    The 64-character identifier in your .sql files is auto-generated by Microsoft Fabric's Git integration for internal version control. There is no public API or documented method to generate this identifier from a string. Microsoft Fabric provides REST APIs for managing Git integration, including connecting workspaces to repositories, committing changes, and syncing updates. While one can create a standard 64-character SHA-256 hash from a string using tools or programming languages like Python, it may not match Fabric's identifier. The identifier may be derived from various inputs, and without specific documentation from Microsoft, it cannot be replicated independently.

     

    Please check below documentation for reference:
    Automate Git integration by using APIs - Microsoft Fabric | Microsoft Learn

    SHA256 Class (System.Security.Cryptography) | Microsoft Learn

    SHA256.Create Method (System.Security.Cryptography) | Microsoft Learn

    Ensuring Data Integrity with Hash Codes - .NET | Microsoft Learn

     

    If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
    Thank you.

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi AndreaTosti  , Thank you for reaching out to the Microsoft Community Forum.

    Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
    Thank you

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi @AndreaTosti  , Thank you for reaching out to the Microsoft Community Forum.

    Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
    Thank you

  • I know this is already marked as solved, but I would like to point out that MS Fabric stored procedures and views do not save comments before the CREATE key word in the data warehouse. So, while Microsoft generates this comment, it is not ultimately saved as part of the data warehouse view.

    The result is that the data warehouse and the git file are always out-of-synch when comparing in VS Code schema compare. We are currently just ignoring that difference, but it would be very helpful if either comments would be recognized before the CREATE or if schema compare accounted for this extra auto-generated comment from MS Fabric.