Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a WHERE Clause feature in SSIS for a Flat File Source?

I don't know too much about SSIS and I've googled as much as I could on this. I'd really appreciate any help I could get.

I'm building an SSIS package and I only want to insert a specific set of data from a Flat File Source. Is there a way to use a WHERE clause to only pull specific data in?

For example, how can I make this query into a Data Flow Task?

INSERT INTO #TempTable (Column1, Column2)
SELECT Column1, Column2
FROM TEXTFILESOURCE
WHERE Column1 <> 'ABC'

Can this be achieved through Data Flow Task?

like image 662
iamtheratio Avatar asked Jan 19 '11 15:01

iamtheratio


People also ask

How do I read a flat file in SSIS?

Use the Connection Manager page of the Flat File Source Editor dialog box to select the connection manager that the Flat File source will use. The Flat File source reads data from a text file, which can be in a delimited, fixed width, or mixed format.

How use variable in flat file source in SSIS?

Configure the Flat File connection manager to use a variableIn the Connection Managers pane, right-click Sample Flat File Source Data, and select Properties. In the Properties window, for Expressions, select the empty cell, and then select the ellipsis button (...).

Where is Flat File Destination SSIS?

Select the Data Flow tab. In the SSIS Toolbox, expand Other Destinations, and drag Flat File Destination onto the data flow design surface.


1 Answers

AFAIK there is nothing in the Flat File Source task that can do this, but once you have that set up and the data flowing in, you can use a Conditional Split to filter the rows using the same logic as your Where condition in your query.

like image 132
grapefruitmoon Avatar answered Oct 17 '22 13:10

grapefruitmoon