Snowflake stores queries in the information schema in QUERY_HISTORY table.
The following query returns queries run in the last 7 days
In a Jupyter Notebook, use the snowflake-python-connector to connect to snowflake and store the queries in an array. Then use the data-lineage library to visualize or process the lineage.
- Install Snowflake Python Connector
- Connect to Snowflake using one of the authentication methods.
- Run query and store results in an array.