BizTalk Adapter for Cosmos DB

Build 21.0.7930

Insert Schemas

Executing an Insert Updategram

Insert updategrams have only an after block, which specifies how the data will change. If multiple after blocks are specified, the adapter will execute the inserts in bulk.

Insert Instance

Below is an instance of an insert request.

<ns0:parameters xmlns:ns0="http://www.cdata.com/CosmosDBProvider/2021">
  <ns0:sync>
    <ns0:before></ns0:before>
    <ns0:after>
	  <ns0:table name="Customers" schema="Entities" catalog="CData">
		<ns0:CompanyName>CompanyName_0</ns0:CompanyName>
		<ns0:Balance>10</ns0:Balance>
	  </ns0:table> 
    </ns0:after>
  </ns0:sync>
</ns0:parameters>

Insert Schema

Below is an insert schema. The response contains the _id of the newly inserted record and the number of rows affected.

<?xml version="1.0" encoding="utf-16" ?> 
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.cdata.com/CosmosDBProvider/2021" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="parameters">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="sync">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="after">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="[CData].[Entities].Customers">
                      <xs:complexType>
                        <xs:attribute name="CompanyName" type="xs:string" /> 
                        <xs:attribute name="City" type="xs:string" /> 
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="table">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" name="row">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="_id" type="xs:string" /> 
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="AffectedRows" type="xs:int" /> 
    </xs:complexType>
  </xs:element>
</xs:schema>

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930