这是我的json模型:
item=item={"Company":"ABCD",
"Industry":"Invest.Services",
"Sector":"Financial",
"Financial_Results":
[{"Date":"2007-03-31","Frequency":"Annual","REV1":"20","REV3":"33"},
{"Date":"2008-03-31","Frequency":"Annual","REV1":"20","REV3":"34.43"},
{"Date":"2012-03-31","Frequency":"Annual","REV1":"30","REV3":Decimal("230")},
{"Date":"2013-03-31","Frequency":"Quarterly","REV1":Decimal("30"),"REV3":"3.32"},
{"Date":"2013-06-31","Frequency":"Quarterly","REV1":Decimal("20"),"REV3":"-0.343"},
{"Date":"2013-09-31","Frequency":"Quarterly","REV1":"20.50","REV3":"-0.543"}]
}
table.put_item(Item=item)
item=item={"Company":"EFGH",
"Industry":"Mining",
"Sector":"Metals",
"Financial_Results":
[{"Date":"2007-03-31","Frequency":"Annual","REV1":"20","REV3":"33"},
{"Date":"2008-03-31","Frequency":"Annual","REV1":"20","REV3":"34.43"},
{"Date":"2012-03-31","Frequency":"Annual","REV1":"30","REV3":Decimal("230")},
{"Date":"2013-03-31","Frequency":"Quarterly","REV1":Decimal("30"),"REV3":"3.32"},
{"Date":"2013-06-31","Frequency":"Quarterly","REV1":Decimal("20"),"REV3":"-0.343"},
{"Date":"2014-03-31","Frequency":"Annual","REV1":"20.50","REV3":"-0.543"}]
}
table.put_item(Item=item)
公司 - 分区键(哈希键)。
无范围键(排序键)。
我的要求是:
注意: 我已经提到了以下链接 http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Attributes.html#DocumentPaths
我还是得不到任何结论。请帮助我。提前致谢
答案 0 :(得分:0)
Atlast在R& D整整一天后找到了答案。 根据AWS DynamoDB文档和其他严肃的研究,我得出结论,我的json模型准备(顶部)目前不受支持。根据我的要求,我需要压缩我的数据而不是文档基础。感谢所有贡献者。