Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with ExecuteStatement using PartiQL #186

Open
ffleandro opened this issue Nov 11, 2024 · 0 comments
Open

Doesn't work with ExecuteStatement using PartiQL #186

ffleandro opened this issue Nov 11, 2024 · 0 comments

Comments

@ffleandro
Copy link

Describe the issue

Can't run PartiQL queries against a dynalite instance that work against a real DynamoDB table.

/my-project/node_modules/@smithy/smithy-client/dist-cjs/index.js:836
  const response = new exceptionCtor({
                   ^

UnknownOperationException: UnknownError
    at throwDefaultError (/my-project/node_modules/@smithy/smithy-client/dist-cjs/index.js:836:20)
    at /my-project/node_modules/@smithy/smithy-client/dist-cjs/index.js:845:5
    at de_CommandError (/my-project/node_modules/@aws-sdk/client-dynamodb/dist-cjs/index.js:2233:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /my-project/node_modules/@smithy/middleware-serde/dist-cjs/index.js:35:20
    at async /my-project/node_modules/@smithy/core/dist-cjs/index.js:168:18
    at async /my-project/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38
    at async /my-project/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:34:22
    at async file:///my-project/api/sync-service/test.js:12:21 {
  '$fault': 'client',
  '$metadata': {
    httpStatusCode: 400,
    requestId: 'LV1BKTNWLZRA1JWNLLWPJT4LK3KGI0KVCGW5T0IA8KUNR4SK65SQ',
    extendedRequestId: undefined,
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  },
  __type: 'com.amazon.coral.service#UnknownOperationException'
}

Steps to reproduce
Using the DynamoDBDocClient and ExecuteStatementCommand, try to run a PartiQL query against a dynalite instance.
Example:

return dynamoDbDocClient
    .send(new ExecuteStatementCommand({
      Statement: 'SELECT * FROM "my-table" WHERE table_id = ?',
      Parameters: [{ S: tableId }],
})).then((result) => result.Items || []);

Expected behavior
The same query that works against a real DynamoDB table should work against a dynalite instance.

Desktop
Please complete the following information (if appropriate):

  • OS: Mac OS 14.4.1
  • Node.js: 20.13.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant