DynamoDB: attempt to execute a filter is not supported for the supplied filter counter argument

I work with iOS SDK with Amazon web services

I am trying to make a scan request with the code below:

DynamoDBScanRequest *request = [[DynamoDBScanRequest alloc] initWithTableName:self.tableName]; DynamoDBCondition *condition = [[DynamoDBCondition alloc] init]; [condition setComparisonOperator:@"GT"]; NSString *key = [[alertView textFieldAtIndex:0] text]; //Returns NSString @"00610" [request setScanFilterValue:condition forKey:key]; DynamoDBScanResponse *response = [self.dbClient scan:request]; 

I get this error:

Filter attempt is not supported for the provided filter argument

Please help explain what is happening !!!!

+4
source share
1 answer

Conditions require a certain size AttributeValueList for the condition name based on the condition name; this error means that you tried to use GT (more) with the wrong number of attributes. More than 1 attribute value is required, so maybe you provide 0 or 2.

Here are other conditions and the number of attribute values โ€‹โ€‹required:

 NOT_NULL 0 (exists) NULL 0 (not exists) EQ 1 (equal) NE 1 (not equal) IN 1 (exact matches) LE 1 (less than or equal to) LT 1 (less than) GE 1 (greater than or equal to) GT 1 (greater than) CONTAINS 1 (substring or value in a set) NOT_CONTAINS 1 (absence of a substring or absence of a value in a set) BEGINS_WITH 1 (a substring prefix) BETWEEN 2 (between) 
+2
source

All Articles