2012年3月22日星期四

Flat File Data Source

Is there away to use wild card in the file name for the flat file data source?

Like //servername/directory/*.txt

Your best bet is going to be to create a ForEach Loop Enumerator and then place any logic that you'd like to use inside the loop. The collection enumerator you'll use is the For Each File enumerator. Inside that container, you can use your wild card. I have a video that shows you how to do this here if you'd like to see a step-by-step instruction: http://www.jumpstarttv.com/Media.aspx?vid=34

-- Brian Knight

|||Thanks Brian. I'll watch it ASAP.|||No problem. To better qualify my answer BTW, you can use wild cards in your source. For example, you can look in the built-in examples that ship with SQL to see an example of this. See C:\program files\microsoft sql server\90\Samples\Integration Services\Package Samples\CaptureDataLineage Sample for more info. The loop gives you more flexibility though with this and allows you to do more advanced breakpoints and multiple tasks against the source file.|||

Phil026 wrote:

Is there away to use wild card in the file name for the flat file data source?

Like //servername/directory/*.txt

Phil,

Look at using the MULTIFLATFILE connection manager. This is exactly what it is provided for.

Multiflatfile Connection Manager
(http://msdn2.microsoft.com/en-us/library/ms137830.aspx)

-Jamie

sql

没有评论:

发表评论