Metadata-Version: 2.1
Name: diqu
Version: 0.0.3
Summary: CLI companion tool to support dq-tools package
Home-page: https://github.com/infinitelambda/dq-tools-cli
Keywords: flake8,markdown,lint
Author: IL
Author-email: dat@infinitelambda.com
Requires-Python: >=3.9,<4.0
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Dist: jira (>=3.5.2,<4.0.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Requires-Dist: rich-click (>=1.7.0,<2.0.0)
Requires-Dist: slack-sdk (>=3.23.0,<4.0.0)
Requires-Dist: snowflake-connector-python[pandas,secure-local-storage] (>=3.3.1,<4.0.0)
Project-URL: Repository, https://github.com/infinitelambda/dq-tools-cli
Description-Content-Type: text/markdown

# diqu

[![PyPI version](https://badge.fury.io/py/diqu.svg)](https://pypi.org/project/diqu/)
![python-cli](https://img.shields.io/badge/CLI-Python-FFCE3E?labelColor=14354C&logo=python&logoColor=white)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![python](https://img.shields.io/badge/Python-3.9|3.10|3.11-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)

CLI companion tool supporting the Alert / Notification for [![dq-tools](https://img.shields.io/badge/dq--tools-hub-FF694B?logo=dbt&logoColor=FF694B)](https://hub.getdbt.com/infinitelambda/dq_tools)

- [diqu](#diqu)
  - [Installation](#installation)
  - [Usage](#usage)
  - [How to Contribute](#how-to-contribute)
  - [About Infinite Lambda](#about-infinite-lambda)

## Installation

```bash
pip install diqu [--upgrade]
```

## Usage

```bash
dbt run -s dq_tools
diqu alert \
  --project-dir /path/to/dbt/project \
  --to slack --to jira
```

<details> <!-- markdownlint-disable no-inline-html -->
  <summary>Sample logs</summary>

  ```log
  04:33:17  diqu: INFO - Run with diqu==1.0.0 🏃
  04:33:19  diqu: INFO - Using dbt project at: /path/to/dbt/project
  04:33:19  diqu: INFO - Using dbt profiles.yml at: ~/.dbt
  04:33:19  diqu: INFO - Using snowflake connection
  04:33:19  diqu: INFO - Looking for the query in: /path/to/site-packages/diqu/packages/include/dq_tools__get_test_results.sql
  04:33:23  diqu: INFO - Alerting to channel: SLACK
  04:33:23  diqu: INFO - ✅ Done > Slack
  04:33:23  diqu: INFO - Alerting to channel: JIRA
  04:33:23  diqu: INFO - ✅ Done > JIRA
  ```

</details>

In particular to the alert module, here are the additional configurations:

- For SLACK, you need to use the environment variables to configure the Slack Channel:

  ```bash
  export SLACK_TOKEN=your_token
  export SLACK_CHANNEL=your_channel_name
  diqu alert --to slack
  ```

- For JIRA, you need to use the environment variables to configure the JIRA Board:

  ```bash
  export JIRA_SERVER=your_jira_server e.g. https://your_value.atlassian.net/
  export JIRA_AUTH_USER=your_service_account e.g. dqt_user@your_value.com
  export JIRA_AUTH_PASSWORD=your_service_token e.g. ATATTxxxxx
  export JIRA_PROJECT_ID=your_project_id e.g. 106413
  diqu alert --to jira
  ```

## How to Contribute

See [CONTRIBUTING.md](./CONTRIBUTING.md)

## About Infinite Lambda

Infinite Lambda is a cloud and data consultancy. We build strategies, help organisations implement them and pass on the expertise to look after the infrastructure.

We are an Elite Snowflake Partner, a Platinum dbt Partner and two-times Fivetran Innovation Partner of the Year for EMEA.

Naturally, we love exploring innovative solutions and sharing knowledge, so go ahead and:

🔧 Take a look around our [Git](https://github.com/infinitelambda) </br>
✏️ Browse our [tech blog](https://infinitelambda.com/category/tech-blog/)

We are also chatty, so:</br>
#️⃣ Follow us on [LinkedIn](https://www.linkedin.com/company/infinite-lambda/) </br>
👋🏼 Or just [get in touch](https://infinitelambda.com/contacts/)

[<img src="https://raw.githubusercontent.com/infinitelambda/cdn/1.0.0/general/images/GitHub-About-Section-1080x1080.png" alt="About IL" width="500">](https://infinitelambda.com/)

