Filtering by an attribute
You can filter data by any attribute selected in a data set. When filtering by an attribute that is not a primary key, Amazon DynamoDB uses its Scan API to scan the entire table, then filters out values to provide the desired result set. This type of search is not efficient, and slows down as a table grows.
To filter by an attribute that is not a composite primary key, use the Filters page in the data set editor. Figure 8-6 shows an example of a filter condition created for the Product Catalog data set, where the BicycleType attribute is equal to Road.
Figure 8-6  
This filter condition uses the Equal to operator, which looks for an exact match. With this filter, a match is found if the BicycleType attribute contains the single value, Road. As mentioned earlier, an attribute, however, can contain a multi-value set, which BIRT returns in value1|value2|value3 format. If the BicycleType attribute contains a multi-value set, such as Road|Hybrid, there is no match.
If you do not know whether a string attribute contains a single value or a multi-value set, do not use the Equal to operator in the filter condition. Instead, use the following operator:
Contains substring, or value in a set
To exclude a value when comparing values in a multi-value set, use the following operator:
Absence of substring, or value in a set
Figure 8-7 shows a filter condition where the Color attribute must contain the value Red.
Figure 8-7  
Figure 8-8 shows the data rows returned when the filter condition in Figure 8-7 is applied. The Color column in each row contains the value Red.
Figure 8-8  

Additional Links:

Copyright Actuate Corporation 2012