Skip to content

Query using filter expression flow example gives error #358

@shrutimantri

Description

@shrutimantri

Expected Behavior

I dont understand if there is actual need for filter expression, as key condition expression is mandatory, and that reduces the filtered output to only one row. We should ideally be using Scan task for filtering. Let me know if this example should be removed.

Actual Behaviour

The second example on this page with the title: "Query items from a table with a filter expression." gives the following error:

Value provided in ExpressionAttributeValues unused in expressions: keys: {:lastname} (Service: DynamoDb, Status Code: 400, Request ID: FI3F09BD1SSN285GI8EB8J472RVV4KQNSO5AEMVJF66Q9ASUAAJG)

The error is correct as we are only making the assignment to :lastname and not actually using it anywhere in the task. How should this filter expression be actually used in this Query task.

Steps To Reproduce

Use this example, and run it on a DynamoDB table "persons" having "id" as the partition key.

Environment Information

  • Kestra Version: 0.14.0
  • Plugin version: 0.14.0
  • Operating System (OS / Docker / Kubernetes): Docker
  • Java Version (If not docker): N/A

Example flow

id: "query"
type: "io.kestra.plugin.aws.dynamodb.Query"
accessKeyId: "<access-key>"
secretKeyId: "<secret-key>"
region: "eu-central-1"
tableName: "persons"
keyConditionExpression: id = :id
expressionAttributeValues:
  :id: "1"
  :lastname: "Doe"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/pluginPlugin-related issue or feature requestarea/qaIssues related to QA, testing, and reproducing bug reportsgood first issueGreat issue for new contributors

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions