liveBook · Manning

Data flow source

As explained in 100 SQL Server Mistakes and How to Avoid Them

A data flow source is an SSIS component that reads rows from an external data source into a data flow.

A data flow source reads rows from an external table into an SSIS data flow. The tempting default is to select a table and extract everything, but unnecessary columns and rows enlarge buffers and can slow the package. section 6.4

Mistake: extracting the whole impressions table

The Merge Aggregates flow needed only CampaignID, CountryCode, EventTime, BidPrice, and CostPerMille. Reading the entire marketing.Impressions table took 16.403 seconds; selecting those columns and filtering to the last 30 days reduced execution to 2.937 seconds. Configure the source with a SQL command when the flow needs only a subset. section 6.4

Use a data flow source safely and efficiently:

  • Extract the whole table only when the flow genuinely needs every row and column. section 6.4
  • Use a SQL command to select required columns and filter rows at the source. section 6.5
  • Prefer OLE DB sources where possible, then test configurations against the performance needs of the environment. section 6.5
Listing 6.7 Loading impression data
SELECT        
   CampaignID, 
   CountryCode, 
   BidPrice, 
   CostPerMille, 
   EventTime
FROM marketing.Impressions
WHERE (EventTime >= GETDATE() - 30) ;

Inspect the command that selects five columns from marketing.Impressions and restricts EventTime to the last 30 days. section 6.4

How 100 SQL Server Mistakes and How to Avoid Them covers it

How deep it goes
Explains table selection, SQL-command filtering, column reduction, buffer effects, and measured runtime improvement, but not component internals.
Examples
Uses marketing.Impressions, Merge Aggregates, selected columns, and a thirty-day EventTime filter as concrete configuration examples.
What it assumes
Assumes familiarity with SSIS data flows, source tables, and basic SQL SELECT and WHERE clauses.
What you can do after
Configure a source with a SQL command that returns only required columns and rows.
How it connects
Connects data flow sources with SQL commands, data flow destinations, transformations, buffers, OLE DB, and ETL performance.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of 100 SQL Server Mistakes and How to Avoid Them. The section links point to the parts of the book it draws on.