Guideline to extract lineage info in OpenLineage format from Snowflake ACCESS_HISTORY view.
open_lineage_access_history.sql is the script to create the view from ACCESS_HISTORY and QUERY_HISTORY that outputs each query that accesses tables in the account in OpenLineage JsonSchema specification.
query_tag
column in the query_history.namespace
of each record is in the format of snowflake://<Organization_name>-<Account_name>
Set your account's organization name to the session variable current_organization
before creating the view and running each query on the view.
set current_organization='my_org';