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