BizTalk Adapter for Amazon DynamoDB

Build 20.0.7654

Custom Schema Example

This section contains a complete schema. The info section enables a relational view of a Amazon DynamoDB table. For more details, see Custom Schema Definitions. The table below allows the SELECT, INSERT, UPDATE, and DELETE commands as implemented in the GET, POST, MERGE, and DELETE sections of the schema below. Set the Location property to the file directory that will contain the schema file.

Use the tablename attribute to specify the name of the table you want to parse. You can use the tablename attribute to define multiple schemas for the same table.

If tablename is not specified, the filename determines the table that is parsed.

Use the pathseparator attribute to specify the character or characters to use to separate the fields in path to a given column. This will only be used when parsing the other:path input. If not specified, the default is the '.' character.

Note: Amazon DynamoDB is case sensitive. Your tablename and specified paths must match the case of how your fields appear in Amazon DynamoDB.

Copy the rows@next input as-is into your schema. The operations, such as dynamodbadoSelect, are internal implementations and can also be copied as is.

<api:script xmlns:api="http://apiscript.com/ns?v1">  

  <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:info>  

  <api:set attr="tablename"       value="restaurants"/>
  <api:set attr="pathseparator"   value="."/>

  <api:script method="GET">
    <api:call op="dynamodbadoSelect">
      <api:push/>
    </api:call>
  </api:script>

  <api:script method="POST">
    <api:call op="dynamodbadoAdd">
      <api:push/>
    </api:call>
  </api:script>

  <api:script method="MERGE">
    <api:call op="dynamodbadoUpdate">
      <api:push/>
    </api:call>
  </api:script>

  <api:script method="DELETE">
    <api:call op="dynamodbadoDelete">
      <api:push/>
    </api:call>
  </api:script>

</api:script>

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