Skip to main content

Extract SQLs from digdag log

Project description

digdaglog2sql

Install

pip install --user digdaglog2sql

or,

$ python -m venv .venv
$ source .venv/bin/activate
(.venv)$ pip install digdaglog2sql

Usage

$ digdaglog2sql --help
Usage: digdaglog2sql [OPTIONS]

Options:
  --input FILENAME               Option is mutually exclusive with session_id,
                                 site.
  --session-id INTEGER           Session ID of workflow. Option is mutually
                                 exclusive with input.
  --site [us|jp|eu01|ap02|ap03]  Option is mutually exclusive with input.
  --output FILENAME              [required]
  --drop-cdp-db                  If true, drop cdp_audience_xxx DB name.
  --help                         Show this message and exit.

You can use log file on local environment.

digdaglog2sql --input workflow-log.txt --output output.sql

Or, you can use Session ID of Treasure Workflow.

digdaglog2sql --session-id 12345 --site us --output output.sql

Ensure set TD_API_KEY into environment variable.

Note

As of May 5 2022, if you want to use sqllineage for Trino and Hive logs from Treasure Data, recommend to install sqlparse and sqllineage as the following:

pip install git+https://github.com/chezou/sqlparse.git@trino#egg=sqlparse==0.4.3.dev0
pip install git+https://github.com/chezou/sqllineage.git@trino#egg=sqllineage==1.3.4

You have to ensure to have node environment for sqllineage installation from source.

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

digdaglog2sql-0.0.3rc1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

digdaglog2sql-0.0.3rc1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file digdaglog2sql-0.0.3rc1.tar.gz.

File metadata

  • Download URL: digdaglog2sql-0.0.3rc1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1022-azure

File hashes

Hashes for digdaglog2sql-0.0.3rc1.tar.gz
Algorithm Hash digest
SHA256 3e2f604813971ee4897ce58bbaf6de6b686e08369be1c9ebaaa6f0dd8e77f9f4
MD5 df766bbdd786ffe69331ddb2240c3faf
BLAKE2b-256 3ea946be97963362994a6f01ee0a9df66bc348e8c75f9859004c2c9cdaeb04a3

See more details on using hashes here.

File details

Details for the file digdaglog2sql-0.0.3rc1-py3-none-any.whl.

File metadata

  • Download URL: digdaglog2sql-0.0.3rc1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1022-azure

File hashes

Hashes for digdaglog2sql-0.0.3rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 848c97c7f2533022c01a1e1432f2178cd314926f2ef3d40809e0df3099e94be0
MD5 40e3099300ecfb453da5cb1c244cfdb2
BLAKE2b-256 5f0c16a6e457cb6183ffd7c16d14024410dbaf04adcc56b3f7015a6750d6a6f2

See more details on using hashes here.

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