*************** Getting Started *************** Install via PyPI ================== Install the package via ``pip`` (or add it to your ``requirements.txt`` file), run:: pip install sqllineage Install via GitHub ================== If you want the latest development version, you can install directly from GitHub:: pip install git+https://github.com/reata/sqllineage.git .. note:: Installation from GitHub requires **NodeJS/npm** for frontend code building. When Node.js/npm is not available, the installation will still succeed but the web-based DAG viewer will not be available. For PyPI wheel installation (``pip install sqllineage``), the frontend code is pre-built so Python/pip will be sufficient. Note if source code distribution installation is specified (``pip install --no-binary sqllineage``), the behavior will be the same as installation from GitHub. SQLLineage in Command Line ======================================= After installation, you will get a `sqllineage` command. It has two major options: - -e option let you pass a quoted query string as SQL statements - -f option let you pass a file that contains SQL statements .. code-block:: bash $ sqllineage -e "insert into table_foo select * from table_bar union select * from table_baz" Statements(#): 1 Source Tables: .table_bar .table_baz Target Tables: .table_foo .. code-block:: bash $ sqllineage -f foo.sql Statements(#): 1 Source Tables: .table_bar .table_baz Target Tables: .table_foo