Evan Koch

Musings on BizTalk Server 2006 and SQL Server 2005
posts - 20, comments - 31, trackbacks - 0

My Links

News

Archives

BizTalk Maps and the Table Looping/Table Extractor Functoids

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.  Consider the following schemas:

Source schema:

Target schema:

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

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

The output isn’t quite what we were hoping for.

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.

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.

By opening up the Table Looping Grid, we’re able to define what fields will go into certain columns/rows:

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.

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:

 Source code for this example can be found here.

Print | posted on Tuesday, August 07, 2007 6:06 PM |

Feedback

Gravatar

# re: BizTalk Maps and the Table Looping/Table Extractor Functoids

Great Article!
The first EASY to read/understand I've seen online!

I'm getting the error:
Warning 4 A first input of the Table-Looping functoid must be a link from a Source Tree Node which acts as the scoping parameter.

my vars are:
2
13
...26 values from my source schema...


What could I be doing wrong?

Thanks in advance!
3/10/2008 4:45 PM | Shahbaz Mirza
Gravatar

# re: BizTalk Maps and the Table Looping/Table Extractor Functoids

Shahbaz,
If can email your SSIS package and source files to me, I'll take a look at it. Please email them to evankoch23ATgmailDOTcom.

Thanks,
Evan
3/11/2008 9:04 AM | Evan Koch
Gravatar

# re: BizTalk Maps and the Table Looping/Table Extractor Functoids

Evan, did you ever resolve Shahbaz's error? I'm getting the same thing myself, and while it's just a warning, I'm mystified.
8/18/2008 1:17 PM | Paul Brazelton
Gravatar

# re: BizTalk Maps and the Table Looping/Table Extractor Functoids

Hi Paul\Shahbaz

Shahbaz is getting a warning not an error. Warning is due to hardcoding the scoping parameter i.e first parameter as 2.
10/12/2008 2:43 AM | Pradeep
Gravatar

# re: BizTalk Maps and the Table Looping/Table Extractor Functoids

Amazing article. Explain looping crystal clear.
3/6/2009 6:50 PM | AShok
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 

Powered by: