CData Python Connector for Amazon DynamoDB

Build 23.0.8839

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 'other:tableapiname' attribute to specify the name of the Amazon DynamoDB table you want to parse. You can use the 'other:tableapiname' attribute to define multiple schemas for the same table. Note: Amazon DynamoDB is case sensitive. Your table name and specified paths must match the case of how your fields appear in Amazon DynamoDB.

The operations, such as dynamodbadoProviderOperationCaller, are internal implementations and can also be copied as is.

<api:script xmlns:api="http://apiscript.com/ns?v1" xmlns:xs="http://www.cdata.com/ns/rsbscript/2" xmlns:other="http://apiscript.com/ns?v1">
  <api:info title="StaticRestaurants" other:catalog="CData" other:schema="AmazonDynamoDB" description="StaticRestaurants" other:tableapiname="StaticRestaurants"  other:version="20">
    <attr   name="id"      xs:type="decimal"   key="true"   columnsize="17"     precision="38"   scale="6"   readonly="false"   description="Dynamic Column."   other:dynamodatatype="N"   other:relativepath="restaurant_id"   other:filterable="true"   other:fullpath="restaurant_id"      other:apiname="&amp;quot;restaurant_id&amp;quot;"                          />
    <attr   name="borough"            xs:type="string"                 columnsize="2000"                                readonly="false"   description="Dynamic Column."   other:dynamodatatype="S"   other:relativepath="borough"         other:filterable="true"   other:fullpath="borough"            other:apiname="&amp;quot;borough&amp;quot;"                                />
    <attr   name="address_zipcode"    xs:type="int"                    columnsize="4"      precision="10"               readonly="false"   description="Dynamic Column."   other:dynamodatatype="S"   other:relativepath="zipcode"         other:filterable="true"   other:fullpath="address.zipcode"    other:apiname="&amp;quot;address&amp;quot;.&amp;quot;zipcode&amp;quot;"    />
    <attr   name="address_coord_0"    xs:type="double"                 columnsize="8"      precision="15"               readonly="false"   description="Dynamic Column."   other:dynamodatatype="N"   other:relativepath="coord"           other:filterable="true"   other:fullpath="address.coord[0]"   other:apiname="&amp;quot;address&amp;quot;.&amp;quot;coord&amp;quot;[0]"   />
    <attr   name="address_coord_1"    xs:type="double"                 columnsize="8"      precision="15"               readonly="false"   description="Dynamic Column."   other:dynamodatatype="N"   other:relativepath="coord[1]"        other:filterable="true"   other:fullpath="address.coord[1]"   other:apiname="&amp;quot;address&amp;quot;.&amp;quot;coord&amp;quot;[1]"   />
    <attr   name="address_building"   xs:type="int"                    columnsize="4"      precision="10"               readonly="false"   description="Dynamic Column."   other:dynamodatatype="S"   other:relativepath="building"        other:filterable="true"   other:fullpath="address.building"   other:apiname="&amp;quot;address&amp;quot;.&amp;quot;building&amp;quot;"   />
    <attr   name="address_street"     xs:type="string"                 columnsize="2000"                                readonly="false"   description="Dynamic Column."   other:dynamodatatype="S"   other:relativepath="street"          other:filterable="true"   other:fullpath="address.street"     other:apiname="&amp;quot;address&amp;quot;.&amp;quot;street&amp;quot;"     />
    <attr   name="name"               xs:type="string"                 columnsize="2000"                                readonly="false"   description="Dynamic Column."   other:dynamodatatype="S"   other:relativepath="name"            other:filterable="true"   other:fullpath="name"               other:apiname="&amp;quot;name&amp;quot;"                                   />
    <attr   name="cuisine"            xs:type="string"                 columnsize="2000"                                readonly="false"   description="Dynamic Column."   other:dynamodatatype="S"   other:relativepath="cuisine"         other:filterable="true"   other:fullpath="cuisine"            other:apiname="&amp;quot;cuisine&amp;quot;"                                />
  </api:info>


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

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

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

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

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839