Search code examples
amazon-dynamodbdynamodb-queries

Dynamo DB - scan with filter to return entries where column is not null


I want to run scan on a Dynamo DB database and get all entries where a specific column is not null.

Saw this post How do you query for a non-existent (null) attribute in DynamoDB

and I tried this - but it does not return any results.

Here's my query:

aws dynamodb scan --table-name some_table_name --projection-expression "id, email, name" --condition-expression "attribute_exists(activation_date)"

Please advise.


Solution

  • I believe aws dynamodb scan does not have any parameter called --condition-expression, and is probably ignored. The parameter you're looking for is --filter-expression.