Share via


Step 4: Create a Transform to Map the SalesOrder Schema to the Insert Operation Schema

 

Important

Microsoft Azure BizTalk Services (MABS) is being retired, and replaced with Azure Logic Apps. If you currently use MABS, then Move from BizTalk Services to Logic Appsprovides some guidance on moving your integration solutions to Logic Apps.

If you're brand new to Logic Apps, then we suggest getting started here:

Uses a Transform to map the SalesOrder schema (ECommerceSalesOrder.xsd) to the schema of the Insert operation on the SalesOrder table.

To configure a transform

  1. In Visual Studio, right-click the EAIEDITutorial project, select Add, and then select New Item.

  2. In Add New Item, select Map, enter SalesOrder_SQL.trfm for the map name, and then select OK.

  3. In Solution Explorer, double-click the SalesOrder_SQL.trfm file to open the map.

  4. In the Transform window, set the source schema to ECommerceSalesOrder.xsd and the destination schema to EAIEDITutorial_SalesOrder_TableOperation.dbo.SalesOrder.xsd.

  5. Directly map the following nodes in the source and destination schemas:

    Source Schema

    Destination Schema

    CompanyCode

    CompanyCode

    PartId

    PartNum

    Quantity

    Qty

    AskPrice

    UnitAskPrice

    RequestShipmentDate

    ShipDate

    Comments

    CustomerComments

    DateNow

    DateRequested

  6. Map the following nodes in the source and destination schemas using a String Concatenate map operation:

    Source Schema

    Destination Schema

    Address\Line1

    SellToAddress

    BillToAddress

    Address\Line2

    SellToAddress

    BillToAddress

    Address\City

    SellToAddress

    BillToAddress

    Address\State

    SellToAddress

    BillToAddress

    Address\Country

    SellToAddress

    BillToAddress

    Address\ZipCode

    SellToAddress

    BillToAddress

    Contact\FirstName

    PartnerContact

    Contact\LastName

    PartnerContact

    To map elements using the String Concatenate map operation, drag-and-drop the map operation from toolbox to the mapper area. Add each element from the source tree as an input to the map operation, and then connect the String Concatenate component to the elements in the destination schema. The follow illustration shows the transform with all the relevant elements mapped:

    Transform SalesOrder XML message

    Note

    The SalesOrder_SQL.trfm is also available as part of the sample at MSDN Code Gallery.

  7. Save your changes to the map.

See Also

Create and Deploy the BizTalk Services Project