Although SQL WorkBench is a handy tool for querying AWS Redshift, we still need to CLI tool for automation.
To install psql on MacOS, we need to
brew install postgresql
Then we could download data without using \copy but only –csv
echo "select * from example" | psql -h my.endpoint.com -p 5439 --csv mydatabase myuser > output.csv
Hi Mr.Dong,I learned about your blog from one of your articles “poll&epoll in the kernel”. Thank you for you selfless sharing! It helped me a lot.I am a student at school and I will follow you to server in AILBABA
Actually, I am not in Alibaba now…