AWS SimpleDB CLI:如何使用'select'命令?
问题描述:
我正尝试从AWS CLI使用AWS SimpleDB的select
命令。AWS SimpleDB CLI:如何使用'select'命令?
所需的呼叫如下: select --select-expression <value>
与select-expression
被描述如下:--select-expression (string) The expression used to query the domain.
The select is supposed to be similar to the SQL
select statement,但我一直对语法收到错误,如:
aws sdb select --select-expression "select * from my-domain"
An error occurred (InvalidQueryExpression) when calling the Select operation: The specified query expression syntax is not valid.
我无法找到任何有关正确语法的文档或示例。
答
我找到了解决办法 - 原来我需要使用单引号的查询和特殊字符周围的表名:
AWS SDB选择 - 选择表达“SELECT * FROM`我的域`'
附注:Amazon SimpleDB已被弃用。它仍然存在,它仍然在运行,[如果你知道在哪里可以找到文档](http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/Welcome.html)。但是,如果您正在寻找长期解决方案,请考虑使用Amazon DynamoDB。 –