Accessing data in Amazon DynamoDB : Specifying the data to retrieve from Amazon DynamoDB : How to specify what data to retrieve from an Amazon DynamoDB database
 
 
Specifying the data to retrieve from Amazon DynamoDB
Once the report connects to an Amazon DynamoDB database, you create a data set and select the table from which to retrieve data. A data set can retrieve data from one table only.
After selecting a table, you select the attributes from which to retrieve data. BIRT maps each selected attribute to a data set column. Because DynamoDB is a schema-less database in which each table item can contain a different set of attributes, you have the option of specifying the number of items to scan to compile the list of attributes. Scanning items in a table can be resource intensive. If all the table items contain the same attributes, specify one (the default) as the number of items to scan.
How to specify what data to retrieve from an Amazon DynamoDB database
1 In Data Explorer, right-click Data Sets, then choose New Data Set.
2 In New Data Set, specify the following information:
1 In Data Source Selection, select the Amazon DynamoDB data source to use. Data Set Type displays Amazon DynamoDB Data Set.
2 In Data Set Name, type a name for the data set.
3 Choose Next.
3 In New Data Set, in Query, do the following:
1 In DynamoDB Table, select the table from which to retrieve data.
2 In Number of Items to Scan for Attributes, type the number of table items for which to search for attributes, then choose Scan. The fewer the number of items to scan, the faster the response.
Available Attributes displays the attributes defined in the scanned items. If you do not see the attributes you expect and want, increase the number of items to scan, then choose Scan.
3 In Available Attributes, select the attribute or attributes whose data to retrieve.
4 If Searchable by Composite Key is available, you can filter the data to retrieve by searching for a hash key value, a range key value, or both. For information about this task, see “Filtering by a composite primary key,” later in this chapter.
5 In Advanced Settings, specify the following options:
*In AWS fetch size, type the maximum number of items to return in each web service call to the database, or select No fetch size limit. If you select the latter, each fetch operation returns the entire result set up to 1MB, the limit set by Amazon DynamoDB. The smaller the fetch size value, the faster the response time per web service call. The higher the fetch size, the fewer the calls to fetch data.
*Select the Eventually consistent reads option to maximize the read throughput. Deselect this option to request a strongly consistent read, which returns a result that reflects all writes that receive a successful response prior to the read.
*In Separator character(s) in a multi-valued set column, specify the character to use to separate values in a multi-value set. By default, BIRT returns a multi-value set as a string in the following format:
Value1|Value2|Value3
You can change the separator character to a comma, for example, to return results in the following format:
Value1,Value2,Value3
Figure 7‑2 shows an example of an Amazon DynamoDB query.
Figure 7‑2 Example of an Amazon DynamoDB query
4 Choose Finish to save the data set. Edit Data Set displays the columns, and provides options for editing the data set.
5 Choose Preview Results to view the data rows returned by the data set.