Looping Over Flat Files

Kevin Feasel

2016-07-19

Biml

Ben Weissman uses Biml to loop over flat files with matching schemas:

To get that done in SSIS, we need:

– A variable to store the current file name and will be used as the connection string for our flat file connection
– A for each loop that will loop through our directory, pass each file name in there to our variable and then run a data flow task
– A derived column in our data flow task that will store our variable so we can import it into our SQL table
– Since we want this to be “clean”, we will also run a truncate before the for each loop

So let’s look at the code for that

It’s Biml, so there isn’t much code.  Check it out.

Related Posts

Using Biml With Azure Data Factory v2

Kevin Feasel

2018-03-14

Biml, Cloud

Ben Weissman shows how you can use BimlStudio to build ADF v2 flows: As you may have seen at PASS Summit 2017 or another event, with the announcement of Azure Data Factory v2 (adf), Biml will natively support adf objects. Please note, that the native support is currently only available in BimlStudio 2018. If you’re […]

Read More

Building A Biml Project: Adding Tasks

Kevin Feasel

2018-02-28

Biml

Martin Schoombee continues his series on building a Biml project by adding SSIS tasks: The <DirectInput> tag is pretty self-explanatory and executes the stored procedure (in this case). It could also have been a SQL query. The <Results> element contains a <Result> child element for each field returned in our query. I found this a little confusing at first, but the Name property’s […]

Read More

Categories

July 2016
MTWTFSS
« Jun Aug »
 123
45678910
11121314151617
18192021222324
25262728293031