Fixes S3ToRedshift COPY query (#10436)
* fix: 🐛 Wrong S3 URI on COPY query The S3 URI on COPY query was appending the target Redshift table to the S3 object key. * test: 💍 Fixed typo on test query The COPY query that the operator used is the same query the test uses.
This commit is contained in:
Родитель
0c4f7cd0d0
Коммит
c6358045f9
|
@ -96,7 +96,7 @@ class S3ToRedshiftOperator(BaseOperator):
|
|||
|
||||
copy_query = """
|
||||
COPY {schema}.{table}
|
||||
FROM 's3://{s3_bucket}/{s3_key}/{table}'
|
||||
FROM 's3://{s3_bucket}/{s3_key}'
|
||||
with credentials
|
||||
'aws_access_key_id={access_key};aws_secret_access_key={secret_key}'
|
||||
{copy_options};
|
||||
|
|
|
@ -55,7 +55,7 @@ class TestS3ToRedshiftTransfer(unittest.TestCase):
|
|||
|
||||
copy_query = """
|
||||
COPY {schema}.{table}
|
||||
FROM 's3://{s3_bucket}/{s3_key}/{table}'
|
||||
FROM 's3://{s3_bucket}/{s3_key}'
|
||||
with credentials
|
||||
'aws_access_key_id={access_key};aws_secret_access_key={secret_key}'
|
||||
{copy_options};
|
||||
|
|
Загрузка…
Ссылка в новой задаче