Indexing DynamoDB Databases
Dependencies
Python (32-bit) must be installed on the Voyager Server machine. Ideally, the Python version should be 2.7.
DO NOT USE EARLIER VERSIONS OF PYTHON
Indexing Data
After confirming the dependencies, you need to add a new location.
To create a new location:
Go to Manage > Discovery > Locations
Go to the Add Locations section
Click Databases (Advanced)
Select DynamoDB in the Connections drop-down list
Edit the configuration (see examples below)
Configuration Examples
Example 1
This configuration indexes all the collections in a DynamoDB database. It includes all the fields and maps only one field for all tables. The use of the asterisk (*) in this configuration means to include all fields, all tables and apply the field mapping in all tables.
{
"fields": {"include": ["*"]},
"tables": [
{
"name": "*",
"action": "INCLUDE"
},
{
"name": "*",
"map": {
"NAME": "name",
"Geometry_WKT": "geo"
}
}
],
"dynamodb": {
"endpoint_url": "http://localhost:8000",
"region": "us-west-2"
}
}
Example 2
Index a single table.
{
"fields": {
"include": ["*"]
},
"tables": [{
"name": "CITIES",
"action": "INCLUDE"
},
{
"name": "*",
"map": {
"NAME": "name",
"Geometry_WKT": "geo"
}
}],
"dynamodb": {
"endpoint_url": "http://localhost:8000",
"region": "us-west-2"
}
}
Example 3
This example demonstrates the following:
Index two tables
Map fields for each collection
{
"fields": {"include": ["*"]},
"tables": [
{
"name": "STATES",
"action": "INCLUDE"
"map": {"STATE_NAME": "name", "Geometry_WKT": "geo}
},
{
"name": "CITIES",
"action": "INCLUDE"
"map": {"CITY_NAME": "name", "Geometry_WKT": "geo"}
}
],
"dynamodb": {
"endpoint_url": "http://localhost:8000",
"region": "us-west-2"
}
}
Usage Notes
Geographic information can be indexed by mapping a geometry field to Voyager’s “geo” field as show in the sample configurations. The geometry field must be well-known text format (WKT).
The endpoint URL in the connection settings is optional and not required if this information is stored in a configuration file.
The region setting is required.