You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the current dlt <> redshift integration, there is no way for the user to specify the region in the COPY statement. This causes load jobs to fail permanently when the s3 bucket and redshift cluster are in different regions.
@djudjuu it's probably enough to add the region from the staging credentials in the RedshiftCopyFileLoadJob SQL statement, so a one line code change. For us to test it, you'd have to create an s3 bucket in a different region than our redshift database resides and see if it works, you can also ask the user to check it out, they'll have to specify a different region for the staging destination (filesystem) and end-destination (redshift)
hey @sh-rp ,
I updated the class locally and it seems to work for me.
Should the region have a default value like 'us-east-1' or what would you suggest?
How about error handling should this be implemented too?
I would be happy to contribute to this issue :)
yannik207
pushed a commit
to yannik207/dlt
that referenced
this issue
Mar 9, 2025
Feature description
Are you a dlt user?
Yes, I run dlt in production.
Use case
When copying data from S3 to redshift, if the s3 bucket is in a different region than your redshift cluster, it is required to specify the REGION of the S3 bucket in your COPY statement. This is documented in AWS docs here - https://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-data-source-s3.html#copy-region
With the current dlt <> redshift integration, there is no way for the user to specify the region in the COPY statement. This causes load jobs to fail permanently when the s3 bucket and redshift cluster are in different regions.
Proposed solution
The COPY statement is templated here I believe:
https://github.com/dlt-hub/dlt/blob/devel/dlt/destinations/impl/redshift/redshift.py#L107
The goal would be to enable the user to configure the REGION with something like a
config.toml
or environment variablesRelated issues
No response
The text was updated successfully, but these errors were encountered: