Step 6 (On Premises): Create a Transform to Map the Message from the Queue to the Insert Schema
The message that is received by BizTalk Server from the Service Bus Queue will be of the ECommerceSalesOrder.xsd schema. However, to insert a message into the SalesOrder table, the message must be of Insert schema that you generated in Step 5 (On Premises): Generate the Schema for Inserting a Message inito SalesOrder Table. So, in this topic, we create a map to transform the ECommerceSalesOrder.xsd schema into the Insert operation schema.
To create a map
In the BizTalk Server you already created, right-click the project, point to Add, and then click New Item. In the New Item dialog box, select Map, enter the map name as
SalesOrder_SQL.btm
, and then click Add.In the map, for the source schema, select ECommerceSalesOrder.xsd. For the destination schema, select TableOperations.SalesOrder.xsd (Insert) schema.
Directly map the following nodes in the source and destination schemas:
Source Schema Destination Schema CompanyCode CompanyCode PartId PartNum Quantity Qty AskPrice UnitAskPrice Comments CustomerComments Use the Date and Time functoid to map values to the DateRequested and ShipDate elements in the destination schema. These nodes are not mapped to the respective nodes in the source schema. Instead, the current date and time is passed on to these nodes by using the Date and Time functoid.
Drag and drop a Date and Time functoid from toolbox to the mapper surface.
Connect the functoid to the DateRequested element in the destination schema.
Drag and drop another Date and Time functoid and connect it to the ShipDate element in the destination schema.
Map the following nodes in the source and destination schemas using a String Concatenate functoid:
Source Schema Destination Schema Address\Line1 SellToAddress
BillToAddressAddress\Line2 SellToAddress
BillToAddressAddress\City SellToAddress
BillToAddressAddress\State SellToAddress
BillToAddressAddress\Country SellToAddress
BillToAddressAddress\ZipCode SellToAddress
BillToAddressContact\FirstName PartnerContact Contact\LastName Perform the following steps for each of the string concatenation mapping sets:
Drag and drop a String Concatenate functoid from toolbox to the mapper surface.
Add each element from the source tree as an input to the String Concatenate functoid.
Drag and configure the output of the String Concatenate functoid to the element in the destination schema.
The completed map resembles the following:
See Also
Tutorial 4: Creating a Hybrid Application Using BizTalk Server 2013