Reputation: 17930
I have no experience dealing with nosql databases such as Amazon AWS DynamoDB.
I have some data stored in Amazon AWS DynamoDB.
Is it possible to export data from DynamoDB to MySQL Server ? If so, how to go about accomplishing that ?
Thanks,
Upvotes: 3
Views: 10681
Reputation: 533
To be a bit more exact you can actually use this Data flow:
DynamoDB->Kinesis DataStreams->Lambda(to invoke the data) -> Mysql(or Aurora)
Upvotes: 0
Reputation: 137
Even though it is pretty old question, still leaving it here for future researchers.
Dynamodb supports streams which can be enabled on any table (from overview section in dynamodb table), which then can be taken via a lambda function (look for trigger tab in dynamodb table) to any storage including but not limited to mysql.
Data flow: Dynamodb update/insert > Stream > Lambda > Mysql.
Upvotes: 3
Reputation: 29769
I would extract the data in CSV format. This "DynamoDBtoCSV" tool seems promising. Then you can import this CSV file into your MySQL database with LOAD DATA INFILE
.
The drawback is that you 1. need to create the receiving structure first and 2. repeat the process for each table. But it shouldn't be too complicated to 1. generate a corresponding CREATE TABLE
statement from the first line output by DynamoDBtoCSV, and 2. run the operation in a loop from a batch.
Now I am asking myself if MySQL is your best call as a target database. MySQL is a relational database, while DynamoDB is NoSQL (with variable length aggregates, non-scalar field values, and so on). Flatenning this structure into a relational schema may not be such a good idea.
Upvotes: 5