# import athena

> Import a data contract from an Amazon Athena database.

# `datacontract import athena`

{/* AUTOGENERATED from `datacontract --help`: do not edit by hand; regenerate with update_command_docs.py */}

Import a data contract from an Amazon Athena database.

```bash
datacontract import athena [OPTIONS]
```

| Option | Default | Description |
|---|---|---|
| `--schema` | — | The Athena database name (called schema in the contract). |
| `--staging-dir` | — | S3 location where Athena writes query results, e.g. s3://my-bucket/athena-results/. |
| `--region` | — | The AWS region the Glue Data Catalog lives in. |
| `--catalog` | — | The Athena catalog (default awsdatacatalog). |
| `--table` | — | Name of a table to import (repeat for multiple tables, omit for all tables in the schema). |
| `--output` | — | File path where the Data Contract will be saved. If not provided, it will be printed to stdout. |
| `--owner` | — | The owner or team responsible for managing the data contract. |
| `--id` | — | The identifier for the data contract. |
| `--debug` / `--no-debug` | — | Enable debug logging |

```bash
datacontract import athena --schema my_database --staging-dir s3://my-bucket/athena-results/ --output datacontract.yaml
```

Guide: **[Import: Amazon Athena](../../imports/athena.md)**.
