如何将数据从Amazon DynamoDB导出到MySQL服务器 [英] How to export data from Amazon DynamoDB into MySQL server
问题描述
我没有处理Nosql数据库(例如Amazon AWS DynamoDB)的经验.
I have no experience dealing with nosql databases such as Amazon AWS DynamoDB.
我有一些数据存储在Amazon AWS DynamoDB中.
I have some data stored in Amazon AWS DynamoDB.
是否可以将数据从DynamoDB导出到MySQL Server? 如果是这样,该如何实现?
Is it possible to export data from DynamoDB to MySQL Server ? If so, how to go about accomplishing that ?
谢谢
推荐答案
我将以CSV格式提取数据.这个"DynamoDBtoCSV" 工具似乎很有希望.然后,您可以使用 LOAD DATA INFILE
将此CSV文件导入MySQL数据库. .
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
.
缺点是您需要1.首先创建接收结构,然后2.对每个表重复该过程.但是,1.从DynamoDBtoCSV输出的第一行生成相应的CREATE TABLE
语句,并2.从批处理中循环运行该操作,应该不太复杂.
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.
现在我在问自己,MySQL是否是您作为目标数据库的最佳选择. MySQL是一个关系数据库,而DynamoDB是NoSQL(具有可变长度的聚合,非标量字段值,等等).将这种结构扁平化为关系模式可能不是一个好主意.
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.
这篇关于如何将数据从Amazon DynamoDB导出到MySQL服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!