Skip to content

Commit

Permalink
docs(athena): add assuming IAM role with PyAthena (apache#21951)
Browse files Browse the repository at this point in the history
  • Loading branch information
gforien authored Oct 27, 2022
1 parent edce579 commit 2d5ee4f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/docs/databases/athena.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ following connection string:
```
awsathena+rest://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{schema_name}?s3_staging_dir={s3_staging_dir}&...
```

The PyAthena library also allows to assume a specific IAM role, by [importing the datasource from YAML](https://superset.apache.org/docs/miscellaneous/importing-exporting-datasources/#importing-datasources-from-yaml) and passing extra parameters:
```
databases:
- database_name: awsathena
sqlalchemy_uri: awsathena+rest://athena.{region_name}.amazonaws.com/{schema_name}?s3_staging_dir={s3_staging_dir}&...
extra: "{\"engine_params\": {\"connect_args\": {\"role_arn\": \"{{ ROLE_ARN }}\" }}}"
```

0 comments on commit 2d5ee4f

Please sign in to comment.