Exporting a table from Amazon RDS into a CSV file

0 votes
Feb 9, 2022 in AWS by Rahul
• 2,120 points
2,981 views

1 answer to this question.

0 votes
The "SELECT ... INTO OUTFILE" command makes a file on the database server. MySQL doesn't give a method for using this command to make a file on the client.  You can in any case send out your information in CSV format by choosing the data in the MySQL command line client and channeling the result to reformat the data as CSV.

mysql - u username - p - - database=dbname - - host=rdshostname - - port=rdsport - - clump
  -e "select * from yourtable"
  | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > yourlocalfilename
answered Feb 9, 2022 by anonymous

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer

How to copy .csv file from Amazon S3 bucket?

Boto3 is the library to use for ...READ MORE

answered Jul 6, 2018 in AWS by Priyaj
• 58,020 points
2,125 views
0 votes
2 answers

How to skip headers when reading a CSV file in S3 and creating a table in AWS Athena?

Thanks for the answer. This should be clear ...READ MORE

answered Aug 14, 2019 in AWS by athenauserz
11,889 views
+1 vote
2 answers

How to read a csv file stored in Amazon S3 using csv.DictReader

The code would be something like this: import ...READ MORE

answered Oct 25, 2018 in AWS by Archana
• 5,640 points
54,463 views
0 votes
1 answer

Notification to AWS SNS to insert a record insert into Mysql Rds table?

You can achieve "automatic" triggering by AWS Lambda or ...READ MORE

answered Oct 31, 2018 in AWS by Priyaj
• 58,020 points
3,419 views
0 votes
1 answer

Creating A New MySQL User In Amazon RDS Environment

AWS RDS security groups documentation (a common ...READ MORE

answered Jul 18, 2018 in AWS by Priyaj
• 58,020 points
2,083 views
+1 vote
1 answer

How to load CSV data to RDS Aurora table using lambda?

Launch an Amazon RDS MySQL database engine ...READ MORE

answered Jul 26, 2018 in AWS by Priyaj
• 58,020 points
4,699 views
0 votes
2 answers

Loading data (incrementally) into Amazon Redshift, S3 vs DynamoDB vs Insert

It is achievable to aggregate event logs ...READ MORE

answered Feb 9, 2022 in AWS by anonymous
1,235 views
0 votes
1 answer

Amazon RDS Instance Password?

There is a Set Master Password  field ...READ MORE

answered Feb 8, 2022 in AWS by anonymous
811 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP