amazon web services - How to execute AWS S3 to Redshift Copy command from SQL script? -
i trying copy files s3 redshift using copy command. used following command through sql workbench , worked fine, copied data redshift table.
copy <redshift table name> 's3://my-bucket/path/to/directory/part' iam_role 'arn:aws:iam::<iam role>' delimiter '|' dateformat 'auto' ignoreheader 1;
but when copied same command .sql
file , tried execute sql file using aws data pipeline, pipeline fails without giving explicit error.
due issues internally developed pipeline definition generation tool, not able use copytoredshift
type activity.
i know how execute copy command file?
try out !!
copy table_name
from s3file_path
credentials "*aws credentails"
ignoreheader 1
acceptinvchars
delimiter '|'
this copy command should work sql file .if not try check errors in stl_load_error_details
Comments
Post a Comment