amazon-web-servicesamazon-dynamodbdistinctdynamodb-queriespartiql

SELECT DISTINCT in PartiQL (AWS DynamoDB)


I am running the following query in the AWS DynamoDB PartiQL editor:

SELECT DISTINCT column1
FROM "my_lucky-table" 
WHERE Id = "db05-5d1"

but I am getting the following error:

ValidationException: Unsupported token in expression: DISTINCT

Any idea how to deal with this? If DINSTICT is not supported in PartiQL what else can I run in order to get the unique values from column1 ?? Thank you.


Solution

  • PartiQL does not support Distinct. I'm not sure what data type your column1 is but for the most part you would need to do the distinct filtering on your client side not on the DynamoDB side.