Metadata-Version: 2.1
Name: emr-serverless-sql-cli
Version: 0.3.0
Summary: 
Author: Damon P. Cortesi
Author-email: 1512+dacort@users.noreply.github.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: boto3 (>=1.26.57,<2.0.0)
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: nbconvert (>=7.8.0,<8.0.0)
Description-Content-Type: text/markdown

# EMR Serverless SQL

An experimental tool for running SQL on EMR Serverless.

Written primarily to scratch an itch, this tool is not recommended for production use-cases.

## Installing

Install and update using pip:

```bash
pip install -U emr-serverless-sql-cli
```

## Running

`emrss` assumes you have a pre-existing EMR Serverless application, IAM job role, and S3 bucket where artifacts will be stored.

You can run simple commands by providing a query string.

```bash
emrss \
    --application-id $APPLICATION_ID \
    --job-role-arn $JOB_ROLE_ARN \
    --s3-bucket $S3_BUCKET \
    "show tables"
```

Or you can also provide a SQL file using the `-f` parameter.

```bash
emrss \
    --application-id $APPLICATION_ID \
    --job-role-arn $JOB_ROLE_ARN \
    --s3-bucket $S3_BUCKET \
    -f script.sql
```

And just for fun, you can also run a PySpark notebook through. 😮

```bash
emrss \
    --application-id $APPLICATION_ID \
    --job-role-arn $JOB_ROLE_ARN \
    --s3-bucket $S3_BUCKET \
    -f notebook.ipynb
```

