Skip to main content

A python library to get unity catalog table lineage information using azure databricks api

Project description

tablelineage

A Python package that can be used to retrieve data lineage using Databricks Data Lineage REST API

Installation

This package is intended to be installed within Databricks as a Python library.

Example Usage

from tablelineage import ShowMeLineage

## Define the parameters
catalog_name = "<catalog_name>"
schema_name = "<schema_name>"
table_name = "<table_name>"
databricks_instance = "<databricks_instance"  # example: adb--xxxxxxxxxxx.x.azuredatabricks.net
workspace_id = "<workspace_id>"
token = "<token>"
## For notebook based jobs you can dynamically get token using the following: 
# token = dbutils.notebook.entry_point.getDbutils().notebook().getContext().apiToken().get()

conn = ShowMeLineage(databricks_instance, workspace_id, token)
df = conn.getTableLineage(catalog_name, schema_name, table_name)
df.display()

"""
Always exclude 'NA' in the 'lineage_direction' column from the resulting dataframe,
unless you are interested in the links to the notebooks referencing specified table/view name.

"""

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tablelineage-0.0.8.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tablelineage-0.0.8-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file tablelineage-0.0.8.tar.gz.

File metadata

  • Download URL: tablelineage-0.0.8.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tablelineage-0.0.8.tar.gz
Algorithm Hash digest
SHA256 fb758a64088fdb6a92a6c72e3475b5b6545cd403f548208ee6c1f5d41d3707fc
MD5 ac9ea482da7f64bf720da47ef7001d17
BLAKE2b-256 0c6d030f5c997146be1e4e7d56d3824c5207859a3b4cf81519668aefd5012f9d

See more details on using hashes here.

File details

Details for the file tablelineage-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: tablelineage-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tablelineage-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f64cbaebd91761e360df82de2291000c4fe4ef28733abdf2970118fc3d5ef933
MD5 fbd382946f403c47177534d31ed1a696
BLAKE2b-256 a55b6882c17f3415b0f9280ed8fff966c0827c7f88b1cf37cd5d66bd3896a622

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page