admin管理员组文章数量:1379856
I've got both a csv and a json representation of my table. I can use the import from S3 feature with the csv just fine, but I have a key called updatedAt which represents a unix timestamp. The csv import makes the key a string, so I can't make a GSI and create query logic in my code based on numbers. When I try the json import, I get the following message from cloud watch:
"Unexpected token. Remainder of the file will not be processed."
Ultimately, my goal is to create the GSI so that I can use my query logic. I'm trying to see if there's a way I can force csv import to enforce types. For example, is it possible to create the table, and then use import to simply populate the data and not both create the table and populate the table?
I've got both a csv and a json representation of my table. I can use the import from S3 feature with the csv just fine, but I have a key called updatedAt which represents a unix timestamp. The csv import makes the key a string, so I can't make a GSI and create query logic in my code based on numbers. When I try the json import, I get the following message from cloud watch:
"Unexpected token. Remainder of the file will not be processed."
Ultimately, my goal is to create the GSI so that I can use my query logic. I'm trying to see if there's a way I can force csv import to enforce types. For example, is it possible to create the table, and then use import to simply populate the data and not both create the table and populate the table?
Share Improve this question edited Mar 18 at 17:21 Peter asked Mar 18 at 17:13 PeterPeter 2703 silver badges19 bronze badges1 Answer
Reset to default 0I ended up just writing a script to add a key called updatedAtNumber set equal to the conversion from string to decimal, then delete updatedAt, create a new updatedAt set to updatedAtNumber values, then delete updatedAtNumber
本文标签: amazon web servicesImport CSV from S3 And Specify Data Types of Keys for DynamoDBStack Overflow
版权声明:本文标题:amazon web services - Import CSV from S3 And Specify Data Types of Keys for DynamoDB? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744500029a2609268.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论