Skip to main content

Library extracting source and destination tables from sql statements

Project description

OpenLineage SQL Parser

Library that extracts lineage from sql statements.

Usage

If you're using OpenLineage integration, there's good chance that you're already using this integration.

This library can be used both as Python library and as Rust library, however it's not published at Cargo yet.

Installation

Python:

$ pip install openlineage-sql 

To install from source, you need to have Rust toolchain.

curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env

You can run cargo tests then:

cargo test

To build Python wheel for your system and architecture you need Maturin build system. It's recommended to install this in virtualenv.

python -m pip install maturin
maturin build --out target/wheels

You can verify that library has been properly build by running

pip install openlineage-sql --no-index --find-links target/wheels --force-reinstall
python -c "import openlineage_sql"

Todo:

  • Support larger part of SQL language
  • Column-level lineage
  • Python as a cargo feature
  • Explore Java integration

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

openlineage_sql-0.15.1.tar.gz (18.6 kB view hashes)

Uploaded Source

Built Distributions

openlineage_sql-0.15.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.0 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

openlineage_sql-0.15.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.0 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

openlineage_sql-0.15.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (4.0 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

openlineage_sql-0.15.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.3 MB view hashes)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

Supported by

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