Click here to Skip to main content
15,881,172 members
Articles / Programming Languages / XSLT

Table Looping and Table Extractor Functoids

Rate me:
Please Sign up or sign in to vote.
4.33/5 (6 votes)
17 Dec 2009CPOL2 min read 54.7K   445   8   4
Article describing how to use the table looping and table extractor functoids in BizTalk maps

Introduction

When dealing with existing systems, sometimes a challenge presents itself in the form of a flat file. Trying to impose structure upon a flat file can be achieved, however, using the Table Looping and Table Extractor functoids. This article will demonstrate the use of these functoids in BizTalk maps.

Audience

This article assumes some familiarity with schemas, BizTalk, and the BizTalk maps.

Overview

Consider the following schemas:

Source schema:

Image 1

Destination schema:

Image 2

One’s first attempt at a map to transform the source to destination might look something like this:

Image 3

We'll use the following input file to test the map.

Image 4

The output isn't quite what we were hoping for. Rather than creating two borrower nodes, the two first names, last names, and SSNs are within a single borrower node.

Image 5

The Table Looping functoid is the key to what we're trying to achieve. Below is the map that uses the Table Looping and Table Extractor functoids to create the desired output.

Image 6

The Borrower fields are used as inputs into the Table Looping functoid as well as some definitions about how many rows and columns there will be. One tip I gleaned from Dan Shultz is to label the input links, as they'll be infinitely more readable within the Table Looping inputs window.

Image 7

The first two arguments are akin to defining the number of rows and the number of columns for the table, and the rest of the arguments define the values that will be used within the table. By opening up the Table Looping Grid, we're able to view which fields will go into certain columns/rows:

Image 8

The Table Extractor functoids are used to define which columns from the table map to use as inputs. Each Table Extractor functoid corresponds to a column within the Table Looping Grid.

Image 9

And finally the output from Table Looping functoid to the Borrower node dictates that a Borrower node be created for each row within the Table Looping Grid. With that said, here’s the output from testing the second map:

Image 10

History

  • 17th December, 2009: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionMy vote of 5 Pin
Stephen M Russell9-Feb-15 23:29
Stephen M Russell9-Feb-15 23:29 
GeneralMy vote of 5 Pin
Shrilata Ellaboina3-Sep-13 9:26
Shrilata Ellaboina3-Sep-13 9:26 
Questioncan we use on reverser sinario Pin
Himanshu Thawait28-Oct-12 7:40
Himanshu Thawait28-Oct-12 7:40 
GeneralMy vote of 3 Pin
Himanshu Thawait28-Oct-12 6:43
Himanshu Thawait28-Oct-12 6:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.