• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Calculation Package
 

Calculation Package

on

  • 272 views

 

Statistics

Views

Total Views
272
Views on SlideShare
272
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Calculation Package Calculation Package Presentation Transcript

    • Calculation Package
      • Obejective:
      • Will Calculate the total order by product.
      • Wil calculate the total average by product.
      • Will Calculate The total cost of the product.
      • From Database source to Flat file destination
    • Target Outcome: ( SQL code)
      • Use Adventureworks
      • Select
      • p.ProductID, sum(p.Quantity) as [Quantity Sum],
      • Sum(p.Quantity*ActualCost) as [Total Cost],
      • avg([t].[Total Cost]/[t].[Quantity Sum]) as [average]
      • from
      • Production.TransactionHistoryArchive p
      • ,(Select ProductID, sum(Quantity) as [Quantity Sum],
      • Sum(Quantity*ActualCost) as [Total Cost]
      • from Production.TransactionHistoryArchive
      • group by ProductID) t
      • where p.ProductID = t.ProductID
      • group by p.ProductID
      • order by p.ProductID
    • Target Outcome : (SQL code) Snapshot:
    • Contol Flow
    • Note: Some task are created for testing purposes.
    •  
    • Data Flow Calculate values
      • Note : Some transformation are added for testing purposes .
    • Source: OLEDB Destination: dbo.Adventureworks
      • SELECT ProductID,Quantity,ActualCost
      • FROM Production.TransactionHistoryArchive
    • Derived Column: Calculate LineItemTotalCost
      • Quantity * ActualCost
    • Aggregate : Sum Quantity and LineItemTotalCost
      • [ProductID] = Group By(ProductID)
      • [QuantitySum] = Sum (Quantity)
      • [TotalCostById] = Sum(LineItemTotalCost)
    • Derived Column 2: Calculate Average Cost
      • [AvgCostByID] = TotalCostByID / QuantitySum
    • Sort Transformation: Sort by ProductID
      • Order By Product ID Desc
    • Destination: Flat File Destination: Load Data
      • C:DOCUME~1KARLO~1.CAMLOCALS~1Temp
    • Configuration Package This will support the file system task for locating the specific flat file in the hard drive.
    • Destination
    •