Enable lineage data system tables
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 03:26 AM - edited 08-15-2023 03:27 AM
Execute the below Python code in your databricks workspace to enable lineage system tables
import requests
ctx = dbutils.notebook.entry_point.getDbutils().notebook().getContext()
api_url = ctx.tags().get("browserHostName").get()
api_token = ctx.apiToken().get()
headers = {'Authorization': f'Bearer {api_token}'}
account_id = ctx.tags().get("accountId").get()
# get metastore id
url = f'https://{api_url}/api/2.1/unity-catalog/metastores'
metastore_id = requests.get(url, headers=headers).json()['metastores'][0]['metastore_id']
# enable lineage tables
url = f'https://{api_url}/api/2.0/unity-catalog/metastores/{metastore_id}/systemschemas/access'
requests.put(url, headers=headers)
Labels:
- Labels:
-
Unity Catalog
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 07:39 AM
Great, I wondered why I didn't see them 👍

