Dear Members of the Community,
I am relatively new to Alteryx and hence having difficulty in one of the use cases that I am encountering at present. I need to use the Redshift Copy command to copy data from AWS S3 buckets to the Redshift database, but the command needs to be invoked through an Alteryx workflow.
I am able to accomplish this via the use of Copy commands over SQL workbench but there is a specific requirement of having to make use of these commands through Alteryx workflows. Is it possible? If yes, how can I do so?
Thank you for your responses and your time in reading this thread.
Warm Regards,
Anuj Mangal
Solved! Go to Solution.
Yes, it is possible. I create a workflow with a single Input tool connected to the Redshift database. In the Options panel, I use a generic Query (#4) such as:
select TOP 20 * from staging.redshifttable
I put the Redshift command in as the Pre SQL Statement (#9). An example might be:
TRUNCATE staging.redshifttable;
copy staging.redshifttable from 's3://bucketname/filename'
credentials 'aws_access_key_id=XXXXXXXX;aws_secret_access_key=XXXXXXXX'
emptyasnull
blanksasnull
IGNOREHEADER 1
csv;
Run the workflow and the Redshift command is executed.
Thanks for the Solution. I tried this and it seems to have worked.