DynamoDB PartiQL Unsupported clause: LIMIT in console

0

Hi there, according to the documentation LIMIT is an optional parameter for DynamoDB PartiQL . However when I attempt to use it in the console by entering a statement like select * from "USER" limit 1 I receive an error "ValidationException: Unsupported clause: LIMIT "

Would be good if the console supported this since the API does

質問済み 2年前1976ビュー
1回答
3

Hi, This is expected behaviour as the Limit parameter does not belong to the Statement but rather the request body:

{
   "ConsistentRead": boolean,
   "Limit": number,
   "NextToken": "string",
   "Parameters": [ 
     ...
   ],
   "ReturnConsumedCapacity": "string",
   "Statement": "string"
}
  client.executeStatement({
    Statement: statement, 
    Limit: 1
  })

For that reason, Limit is not currently available for the Web Console.

profile pictureAWS
エキスパート
回答済み 2年前
  • It makes sense in a way, although someone with a SQL background may find this counter-intuitive. For example ORDER BY is part of the statement for example and from a SQL point of view LIMIT and ORDER BY are both equally part of a "regular" SQL statement

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ