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

feita há 2 anos1975 visualizações
1 Resposta
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
ESPECIALISTA
respondido há 2 anos
  • 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

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas