aws-cli - AWS CLI DynamoDB 路径:
问题描述
如果我以这种方式扫描,效果很好:
aws dynamodb scan --table-name my_table --select "COUNT" --filter-expression "attribute_type(destination.amount, :v_sub)" --expression-attribute-values file://expression-attribute-values.json
destination.amount
正确的路径在哪里:
但现在我想从这样的路径中读取:
我该如何阅读sender.custom:codigoCorporativa
?我不能这样做:
aws dynamodb scan --table-name my_table --select "COUNT" --filter-expression "attribute_type(sender.custom:codigoCorporativa, :v_sub)" --expression-attribute-values file://expression-attribute-values.json
否则我会收到此错误:
An error occurred (ValidationException) when calling the Scan operation: Invalid FilterExpression: Syntax error; token: ":codigoCorporativa", near: "custom:codigoCorporativa,"
我尝试使用:
sender.custom:codigoCorporativa
"sender.custom:codigoCorporativa"
\"sender.custom:codigoCorporativa\"
sender.'custom:codigoCorporativa'
任何想法?
编辑:我刚刚在AWS DynamoDB 文档中读到特殊字符喜欢#
并且:
应该避免,但我现在需要扫描一个名称:
解决方案
好吧,我不得不使用占位符:
aws dynamodb scan --table-name my_table --select "COUNT" --filter-expression
"attribute_type(#code, :v_sub)" --expression-attribute-values file://expression-attribute-values.json --expression-
attribute-names '{"#code":"sender.custom:codigoCorporativa"}'
推荐阅读
- sql - 我想检查/计算两个列表是否至少有一个在 sql developer 中常见的元素
- python - Django CSP 允许来自域的 iframe,而无需为其他所有内容设置 CSP
- c++ - 无法创建图像位图c ++
- javascript - 火狐的图表
- xamarin.forms - 在 Xamarin 表单应用程序中添加注释
- python - 如何让 tf.Tensor 参与计算图?
- css - 将标题放在具有多个图像的部分上?
- c++ - 为什么我们不能在下面的代码中使用方括号?
- actions-on-google - 谷歌操作生成器/谷歌助手如何使用专有名词作为类型
- celery - celery 任务分配算法是什么?