ODBC Driver for Amazon DynamoDB

Build 23.0.8839

カスタムスキーマ定義

自動スキーマ検出 に加え、本製品 ではAmazon DynamoDB テーブルのスキーマを統計的に定義することができます。レストランのデータセットのスキーマを考えてみましょう。

テーブルからの例としてのアイテムは以下のとおり:

{
   "address":{
      "building":"461",
      "coord":[
         -74.138492,
         40.631136
      ],
      "street":"Port Richmond Ave",
      "zipcode":"10302"
   },
   "borough":"Staten Island",
   "cuisine":"Other",
   "grades":[

   ],
   "name":"Indian Oven",
   "restaurant_id":"50018994"
}

カスタムスキーマの定義

ネストプロパティを取得するカスタムスキーマを定義することができます。Location プロパティをスキーマファイルを格納するファイルディレクトリに設定します。

次のスキーマは、other:path プロパティを使って、特定のカラムへのデータがどこに取得されるべきかを定義します。このモデルを使って、階層構造のアービトラリーレベルをフラット化することができます。

'other:tableapiname' 属性は、パースするテーブルを指定します。この属性は同じテーブルに対して複数のスキーマを使うフレキシビリティを与えます。

カスタムスキーマ例 では、上の例を含む完全なスキーマを確認できます。

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

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