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,018 questions
0 comments No comments
{count} votes

Accepted answer
  1. BhargavaGunnam-MSFT 28,446 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://learn.microsoft.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-22T22:18:52.05+00:00

    Hello, I've tested it and it doesn't always work. I've attached the different codes. Thank you Here are my codes :

    -- Création de la table Customers
    USE WAREHOUSE PURVIEW_WH;
    CREATE DATABASE IF NOT EXISTS PURVIEW_TEST;
    CREATE SCHEMA IF NOT EXISTS PV;
    
    --DROP DATABASE PURVIEW_TEST;
    
    -- Création de la table Customers
    CREATE TABLE Customers (
        CustomerID INT,
        CustomerName VARCHAR(50),
        Email VARCHAR(100),
        PRIMARY KEY (CustomerID)
    );
    
    -- Création de la table Orders
    CREATE TABLE Orders (
        OrderID INT,
        CustomerID INT,
        OrderDate DATE,
        PRIMARY KEY (OrderID),
        FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID)
    );
    
    -- Création de la table Products
    CREATE TABLE Products (
        ProductID INT,
        ProductName VARCHAR(50),
        Price DECIMAL(10, 2),
        PRIMARY KEY (ProductID)
    );
    
    -- Insertion de quelques données
    INSERT INTO Customers VALUES (1, 'John Doe', 'john.doe@email.com');
    INSERT INTO Customers VALUES (2, 'Jane Smith', 'jane.smith@email.com');
    
    INSERT INTO Orders VALUES (101, 1, '2024-01-01');
    INSERT INTO Orders VALUES (102, 1, '2024-01-02');
    INSERT INTO Orders VALUES (103, 2, '2024-01-03');
    
    INSERT INTO Products VALUES (1, 'Product A', 50.00);
    INSERT INTO Products VALUES (2, 'Product B', 75.00);
    
    -- Création de la vue pour afficher les détails de la commande
    CREATE VIEW OrderDetails AS
    SELECT
        o.OrderID,
        o.OrderDate,
        c.CustomerName,
        p.ProductName,
        p.Price
    FROM
        Orders o
    JOIN
        Customers c ON o.CustomerID = c.CustomerID
    JOIN
        Products p ON o.OrderID = p.ProductID;
    
    -- Création de la vue pour obtenir un résumé des commandes par client
    CREATE VIEW CustomerOrderSummary AS
    SELECT
        c.CustomerID,
        c.CustomerName,
        COUNT(o.OrderID) AS TotalOrders,
        SUM(p.Price) AS TotalSpent
    FROM
        Customers c
    LEFT JOIN
        Orders o ON c.CustomerID = o.CustomerID
    LEFT JOIN
        Products p ON o.OrderID = p.ProductID
    GROUP BY
        c.CustomerID, c.CustomerName;
    
    -- Création de la stored procedure pour obtenir des informations agrégées en fonction d'un critère de date
    CREATE OR REPLACE PROCEDURE GetOrderSummaryByDate(targetDate DATE)
        RETURNS TABLE (CustomerName VARCHAR, TotalOrders INT, TotalSpent DECIMAL)
        LANGUAGE SQL
        EXECUTE AS CALLER
    AS
    '
        SELECT
            o.CustomerName,
            COUNT(o.OrderID) AS TotalOrders,
            SUM(p.Price) AS TotalSpent
        FROM
            OrderDetails o
        WHERE
            o.OrderDate = targetDate
        GROUP BY
            o.CustomerName;
    
    '
    -- Exemple d'appel de la stored procedure
    CALL GetOrderSummaryByDate(2024-01-02);
    
    
    

    User's image


  2. Sikou Koïta 20 Reputation points
    2024-01-23T21:31:15.41+00:00

    Hello @BhargavaGunnam-MSFT , Yes I followed the document but I can't see the lineage. Thank you in advance for your help. Sikou


  3. Sikou Koïta 20 Reputation points
    2024-01-24T03:17:34.9166667+00:00

    Hello @BhargavaGunnam-MSFT , Thank you for your feedback. I don't have an assistance plan. What information do you need from me? Thanks,

    0 comments No comments

  4. Sikou Koïta 20 Reputation points
    2024-01-24T15:05:15.29+00:00

    Hello @BhargavaGunnam-MSFT , Where can I open the support ticket? What information do you need from me? Thank you very much.