BizTalk Adapter for Amazon DynamoDB

Build 20.0.7654

Custom Schema Definitions

In addition to Automatic Schema Discovery the adapter also allows you to statically define the schema for your Amazon DynamoDB table. Let's consider a schema for the restaurants data set.

Below is an example item from the table:

      "street":"Port Richmond Ave",
   "borough":"Staten Island",

   "name":"Indian Oven",

Defining a Custom Schema

You can define a custom schema to extract out nested properties as their own columns. Set the Location property to the file directory that will contain the schema file.

The following schema uses the other:bsonpath property to define where the data for a particular column should be retrieved from. Using this model you can flatten arbitrary levels of hierarchy.

The collection attribute specifies the collection to parse. The collection attribute gives you the flexibility to use multiple schemas for the same collection. If collection is not specified, the filename determines the collection that is parsed.

In Custom Schema Example, you will find the complete schema that contains the example above.

<api:script xmlns:api="">  

  <api:info title="StaticRestaurants" description="Custom Schema for the DynamoDB restaurants data set.">  
    <!-- Column definitions -->
    <attr name="id"         xs:type="integer"  other:internaltype="N"    other:path="restaurant_id"       iskey="true"   other:keytype="HASH"  />
    <attr name="name"       xs:type="string"   other:internaltype="S"    other:path="name"                />
    <attr name="borough"    xs:type="string"   other:internaltype="S"    other:path="borough"             />
    <attr name="cuisine"    xs:type="string"   other:internaltype="S"    other:path="cuisine"             />      
    <attr name="building"   xs:type="string"   other:internaltype="S"    other:path="address.building"    />
    <attr name="street"     xs:type="string"   other:internaltype="S"    other:path="address.street"      /> 
    <attr name="latitude"   xs:type="double"   other:internaltype="N"    other:path="address.coord.0"     />
    <attr name="longitude"  xs:type="double"   other:internaltype="N"    other:path="address.coord.1"     />
    <input name="rows@next" desc="Internal attribute used for paging through data."/>

  <api:set attr="collection" value="restaurants"/>


Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 20.0.7654