Data lineage purview in Snowflake don't work

Sikou Koïta 20 Reputation points
2024-01-18T01:49:31.7666667+00:00

Hello Microsoft, I can't see the Purview data lineage in Snowflake. Once I do the scan, all the data is scanned but there is no lineage. Thank you very much

Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,026 questions
0 comments No comments
{count} votes

Accepted answer
  1. BhargavaGunnam-MSFT 28,526 Reputation points Microsoft Employee
    2024-01-18T20:09:08.5433333+00:00

    Hello Sikou KOÏTA,

    Welcome to the Microsoft Q&A forum.

    <copied from the documentation page>

    Can you please follow the below and see if it helps?

    After scanning your Snowflake source, you can browse data catalog or search data catalog to view the asset details.

    Go to the asset -> lineage tab, you can see the asset relationship when applicable. Refer to the supported capabilities section on the supported Snowflake lineage scenarios. For more information about lineage in general, see data lineage and lineage user guide. https://video2.skills-academy.com/en-us/purview/register-scan-snowflake#lineage

    Also, please see this known limitations.

    • When object is deleted from the data source, currently the subsequent scan won't automatically remove the corresponding asset in Microsoft Purview.
    • Stored procedure lineage is not supported for the following patterns:
    • Stored procedure defined in Java, Python and Scala languages.

    I hope this helps. Please let me know if you have any further questions.


6 additional answers

Sort by: Most helpful
  1. Sikou Koïta 20 Reputation points
    2024-01-24T16:13:12.6066667+00:00
    0 comments No comments

  2. Adam Jay 0 Reputation points
    2024-06-25T23:05:43.92+00:00

    How I got Lineage working in Purview for Snowflake Stored Procedures (procs).
    Here is an example of what the store proc looks like

    CREATE OR REPLACE PROCEDURE TESTDB.PUBLIC.TEST_SQL_2()
    RETURNS TABLE ("SALES_DATE" VARCHAR(16777216), "QUANTITY" VARCHAR(16777216))
    LANGUAGE SQL
    EXECUTE AS CALLER
    AS
    RESULTSET DEFAULT
    (SELECT a.CUSTOMERID, b.ORDERID from TESTDB.PUBLIC.CUSTOMERS AS a, TESTDB.PUBLIC.ORDERS AS b); 
    BEGIN RETURN TABLE(res); 
    END';
    
    1. Make sure that the PURVIEW_READER role in Snowflake is the owner of the stored proc.

    You can use this query to transfer ownership

    GRANT OWNERSHIP ON PROCEDURE TESTDB.PUBLIC.TEST_SQL_2() TO PURVIEW_READER REVOKE CURRENT GRANTS;
    
    

    2 Make sure that your have all columns in the Return table section and set the EXECUTE AS to CALLER not OWNER

    3 In Purview in the Scan config, make sure you chose Lineage, Code, Signature for the Stored Procedure details

    0 comments No comments