Metadata-Version: 2.5
Name: vibedata-dlt-redshift-mwaa
Version: 0.1.0
Summary: VibeData dlt runtime — Amazon Redshift MWAA Serverless execution unit (a workflow task's dlt load): the database login minted as the task's own execution role.
Author-email: Vibedata <eng@acceleratedata.ai>
License: MIT
Requires-Python: >=3.11
Requires-Dist: boto3>=1.34.0
Requires-Dist: dlt<1.32,>=1.30
Requires-Dist: vibedata-dlt-core[aws]>=0.13.0
Requires-Dist: vibedata-dlt-redshift-core>=0.1.0
Provides-Extra: dev
Requires-Dist: pytest-mock>=3.12; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# vibedata-dlt-redshift-mwaa

The Redshift execution unit for a dlt pipeline run by an Amazon MWAA Serverless workflow task. Install it in place of `vibedata-dlt-redshift-studio`; the pipeline file is the same:

```python
from vibedata.dlt.core.providers.aws_secrets_manager import register_aws_secrets_manager_provider
from vibedata.dlt.redshift import setup_environment, finalize

setup_environment()                       # login from GetCredentials, as the task's execution role
register_aws_secrets_manager_provider()   # location from [providers.aws_secrets_manager] in .dlt/config.toml
```

Keep that order. Under the Studio unit, `setup_environment()` registers the provider on Studio's `vd-secrets` profile and the second call is then a no-op; called the other way round, Studio refuses the profile-less registration.

`setup_environment()` reads `destination.redshift.credentials.host` and `.database` through dlt, so the committed `config.toml` answers in production and a `DESTINATION__REDSHIFT__CREDENTIALS__*` override answers in a sandbox run. The host must be a Serverless endpoint (a provisioned cluster, or credentials given as one connection string, is refused before any call); the execution role needs `redshift-serverless:GetCredentials` on the workgroup.

The login is valid for one hour from `setup_environment()`. A load still running past that fails on its next new connection; split it into separate dlt commands, each of which mints its own.
