Metadata-Version: 2.1
Name: iterable-etl
Version: 0.2.2
Summary: Replicate iterable data in databricks
Home-page: https://github.com/neofinancial/iterable_etl
Author: Neo Financial
Author-email: engineering@neofinancial.com
License: UNLICENSED
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# `iterable_etl`

> Replicate data from iterable in databricks

[![pypi](https://img.shields.io/pypi/v/iterable_etl?style=for-the-badge)](https://pypi.org/project/iterable_etl/)

## Usage

### CLI

```bash
python -m iterable_etl --table <table-name>
```

where <table-name> is one of the following: `campaign_history`, `campaign_metrics`, `campaign_list_history`, `list`, or `ALL`.

### API

```python
from iterable_etl.tables.campaign_history import campaign_history_df
from iterable_etl.tables.campaign_metrics import campaign_metrics_df
from iterable_etl.tables.list import list_df
from iterable_etl.tables.campaign_list_history import campaign_list_history_df

campaign_history_df()
campaign_metrics_df()
list_df()
campaign_list_history_df()
```

Further configs are set via environment variables:

- `ITERABLE_KEY`: API access
- `APP_ENV`: <development/production> - debug mode
- `SAMPLE_OUTPUT`: <True/False> - Save dataframes to csv

## DEV

### Create venv

```bash
python -m venv env
```

### Activate venv

- unix

```bash
source env/bin/activate
```

- windows

```bash
env\Scripts\activate.bat
```

### Install Packages

```bash
pip install -r requirements.txt
```

### Test

```bash
make test
```

### Format

```bash
make format
```

```bash
make lint
```

### Version & Release

```bash
bump2version <major/minor/patch>
```

```bash
make release
```

**note** Don't forget to `git push` with `--tags`

### pre-commit

#### Setup

```bash
pre-commit install
```

#### Run all

```bash
make pre-commit
```


