SSIS 2012 2008 Data Analysis Pivot Unpivot Data Mining Query transformation



Data Analysis Transformations in SSIS 2012 2008 

In this article i will explain SSIS data transformations  that enables you to analyse data, 
The SSIS Data transformations are as follows
  1. Pivot Transformation
  2. Unpivot Transformation
  3. Data Query Transformation
Pivot transformation
  1. The Pivot transformation takes data from a normalised result set and presents the data in a cross tabulated or denormalised structure. 
  2. For example, a normalised Orders data set that lists customer name, product and quantity purchased typically has multiple rows for any customer who purchased multiple products, with each row for that customer showing order details for a different product. 
  3. By pivoting the data set on the product column, the Pivot transformation can output a data set with a single row per customer. 
  4. That single row lists all the purchases by the customer, with the product names shown as column names, and the quantity shown as a value in the product column.
  5.  Because not every customer purchases every product, many columns may contain null values.
The Advanced Editor for Pivot dialog box contains three tabs to configure the properties:
  • Component Properties tab. The Component Properties tab allows you to specify a Name and Description for the OLE DB Command Task. You can also specify a locale with the LocaleID property and whether the data flow is validated at run time or design time by using the ValidateExternalMetadata property.
  • Input Columns tab. The Input Columns tab consists of the Available Input Columns property that enables you to select the columns that the Pivot transformation operation will affect. When a column is selected, it appears in the Input Columns list. The Output alias allows you to define the name of the output column. The Usage Type property defines if the data imported is READONLY data or READWRITE data.
  • Input and Output Properties tab. The Input and Output Properties tab allows you to set the properties of the input and the output columns. The most important property here is the PivotUsage property. This determines what role the input column will play in creating the pivot table and can be configured with the following values:
    • 0. The column is not pivoted, and the values are passed through to the transformation output.
    • 1. The column is part of the set key that identifies one or more rows as part of one set.
    • 2. The column is a pivot column. At least one column is created from each column value. This data must be sorted input column.
    • 3. The values from this column are placed in columns that are created because of the pivot.

Unpivot transformation

  1. The Unpivot transformation takes data from a denormalised or cross-tabulated result set and presents the data in a normalised structure. 
  2. The Unpivot transformation can be configured with the following properties.
  3. At the bottom of the Unpivot Transformation Editor dialog box is the Pivot key value column name. 
  4. Here, you define a column heading for the column that will hold the pivoted data that is converted into normalised data such as Products or Fruits.
  5. The Available Input Columns property enables you to select the input columns that the Unpivot transformation operation turns into rows. 
  6. When a column is selected, it appears in the Input Columns list. Any columns that are not selected are passed through to the data flow output. The Destination Column allows you to define the name of the destination column in the normalised output.
  7. In the Unpivot scenario, multiple input columns are usually mapped to one destination column. 
  8. For example, the Available Input Columns may consist of column headings such as Apples, Pears and Peaches.
  9.  All of these input columns are mapped to a destination column named Fruits that may be defined by the Pivot key value column name property.
  10. The Pivot Key value property specifies the value that is used in the rows in the normalised result set and, by default, uses the same name as the input column but can be changed.
Data Mining Query transformation
  1. The Data Mining Query transformation enables you to run Data Mining Expression (DMX) statements that use prediction statements against a mining model.
  2.  Prediction queries enable you to use data mining to make predictions about sales or inventory figures as an example. 
  3. You can then create a data flow output of the results. One transformation can execute multiple prediction queries if the models are built on the same data mining structure.
  • Mining Model tab. The Mining Model tab is used to provide an existing Connection to the Analysis Services database. You can specify a new connection by clicking the New button. The Mining Structure allows you to specify the Data Mining Structure that is to be used as a basis for analysis. A list of mining models is then presented.
  • Query tab. The Query tab allows you to write the DMX prediction query. A Build New Query button is provided to build the DMX prediction query through a builder.

0 comments:

Post a Comment