Data Flow task of SSIS

Source: Internet
Author: User
Tags ssis

Data Flow tasks are mainly used to run data streams to extract, convert, and load source data. A package can contain multiple data flow tasks or zero data flow tasks. The following diagram shows a package containing a Data Flow task:

 

 

After learning about Data Flow tasks, we will briefly learn how to create data flow tasks.

    1. Double-click the data flow task control in the toolbox or drag it to the control flow page. :

 

 

You can modify the attributes of a Data Flow task as needed.

2. Click the data flow tab and drag and drop an ole db source from the toolbox. Name it products. Right-clickSelect Edit..

The question mark in the SQL statement indicates the parameter value passed through the variable. ClickParameter buttonMap the question mark to the created variable. :

You can also select the new variable option in the drop-down box of the variable property to create a new variable. ClickOKReturn to the parent option box, and then clickOK

3. In the toolbox, drag and drop the lookup control to the data stream, and drag the green arrow from the data source to the conversion to connect the products source and lookup conversion. Convert lookup to find model name. Double-click the control and configure it as follows:

3.1 The General tab configuration is as follows:

 

 

3.2 The Connection configuration is as follows:

The configuration of column 3.3 is as follows:

 

3.4 Advanced Configuration:

If you select full cache mode in the General tab, this tab cannot be used.

 

 

3.5 error output Configuration:

 

 

In this way, the configuration ends after a complete lookup conversion. The current method for converting this completed configuration is to try to match the table productmodel according to the productmodelid in the data source. If no matching row exists, an error occurs. However, this error is ignored because the conversion has been configured. Therefore, no matching is found. The modelname column contains null values.

4. drag a derived column and row count control to the data stream, name it assign default values and prie, no mapping count, and connect the output of lookup conversion to the row count control of the derived column. For example:

 

Open the edit box of the derived column. Configure the following information:

 

The configuration row count information is as follows:

 

 

5. After the source data is converted, the data is loaded into the target data. You can drag and drop row counts to the design pane. Connect the derived column to the row count and name the row count as mapping count. Double-click it and configure the following information:

 

Set the variablename attribute in the component tab to intcount. Of course, this variable must be designed in the variable toolbox.

    • In the data flow target card in the toolbox, a flat file target is moved. Name it partner extract. Right-click Edit and select new. The dialog box is displayed.

 

Click OK. The following dialog box is displayed.

 

The remaining configurations are configured according to the Connection Manager configuration method. Here we output the converted data:

E: \ Bi \ ssisetldemo \ partnerextract.txt

This complete data flow task is created. The overall process is as follows:

 

Run the package. Obtain the following information:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.