B Woodward Portfolio

26
BEVERLY WOODWARD BUSINESS INTELLIGENCE PORTFOLIO

Transcript of B Woodward Portfolio

Page 1: B Woodward Portfolio

BEVERLY WOODWARD

BUSINESS INTELLIGENCE PORTFOLIO

Page 2: B Woodward Portfolio

Contents

SetFocus Business Intelligence Masters Program Project ............................................................................... 3

SQL Server Integration Services ............................................................................................................ 4

Sample Documentation for SSIS portion ....................................................................................................... 5

SSIS AllWorks Project Screenshots ............................................................................................................... 6

Project Master Package ................................................................................................................................. 7

Control Flow .............................................................................................................................................. 7

Data Flow .................................................................................................................................................. 8

Project Time Sheets Package ........................................................................................................................ 9

SQL Server Analysis Services ............................................................................................................... 12

Screenshot of Data Source View ................................................................................................................. 13

Sample MDX queries with results: ........................................................................................................ 14

Sample KPIs ................................................................................................................................................. 19

Miscellaneous Projects in Sharepoint ..................................................................................................... 23

SSRS deployed to Sharepoint ...................................................................................................................... 25

PPS dashboard containing 4 pages ............................................................................................................. 26

2 | P a g e

Page 3: B Woodward Portfolio

SetFocus Business Intelligence Masters Program Project

:Core technologies used in the program

• Microsoft SQL Server 2005

• Microsoft SQL Server 2005 Integration Services (SSIS)

• Microsoft SQL Server 2005 Analysis Services (SSAS)

• Microsoft SQL Server 2005 Reporting Services (SSRS)

• Microsoft Office SharePoint Server 2007 (MOSS)

• Microsoft Office Performance Point Server

Project Summary

Design and build a Business Intelligence solution for a simulated construction company in order to track, analyze and report on every facet of the companies business.

Project Goals

• Using SSIS, build an ETL solution to update the SQL Server 2005 database on a nightly basis from Excel and other flat file sources.

• Using SSAS, create a cube, with partial snowflake architecture.

• Implement a variety of MDX queries in order to manipulate and analyze the data in the cube.

• Using SSAS implement various calculations in order to built critical Key Performance Indicators(KPIs).

• Using SSRS, produce various detailed summary reports.

3 | P a g e

Page 4: B Woodward Portfolio

SQL Server Integration Services

Overview of Goals for SSIS portion:

1. Create a data source using either the XML or System.Data.ODBC drivers

2. Create packages to read each source file and insert/update into AllWorksDBStudent SQL

Database. Remember that the structures may be different for each set of files (raw source data

for invoices is non-normalized, whereas SQL Database will have multiple jobs per invoice, etc.)

3. Generate an email to [email protected] for the results of every package, including rows

inserted and any errors generated (for example, subsequent data loads will contain child

timesheet records with an invalid parent record). The email server for SMTP connections is

someconnection0006.random.com.

4. All scheduled packages will run nightly at midnight.

5. Create a separate package to handle nightly database backups. All backups should occur nightly,

after the last transfer of source data. After the backup occurs, create another package to reindex

all files and shrink the database.

4 | P a g e

Page 5: B Woodward Portfolio

Sample Documentation for SSIS portion

Package 3a: EmployeeMasterPackage.dtsx

Source File: C:\SetFocusBIProjects\StudentVersion\SSISStudentProject\Employees.xls

Sheet: Employees

Target Table: AllWorksDBStudent.dbo.Employees

Log file and Log Table: C:\SetFocusBIProjects\StudentVersion\SSISStudentProject\Logs\OnErrorLogFile.log

AllWorksDBStudent.dbo.ErrorLog

Assumption: Per instructor, data load file will not contain records with NULL key values and also the initial data load will not contain any duplicate keys.

Notification includes the following information:

Successful email notification will include the following:

Execution start time

Total number of rows in the source file

Total number of new rows inserted

Total number of existing rows updated

Failure email notification will include the location of the SSIS Logging text detail file(C:\SetFocusBIProjects\StudentVersion\SSISStudentProject\PackageErrorLogs\ErrorLogFile.log)

Error Handling:

If there is an error, a record will be written to an error log text file for the package.

5 | P a g e

Page 6: B Woodward Portfolio

SSIS AllWorks Project Screenshots

Master Package

The Master package runs all the other packages plus the nightly maintenance tasks as well.

6 | P a g e

Page 7: B Woodward Portfolio

Project Master Package

Control Flow

This package created an error logging procedure for the entire project, then populated or updated a SQL Server table and notified the relevant parties whether it was successful in its tasks.

7 | P a g e

Page 8: B Woodward Portfolio

Data Flow

This is the Data Flow for the employee master package where the data is converted, totaled, imported or updated in to the correct table. The data is also checked for errors and missing information and logged.

8 | P a g e

Page 9: B Woodward Portfolio

Project Time Sheets Package

Control Flow

This package reads multiple CSV files and populates the correct table in the SQL server, then totals all the recorded and the emails are sent to the relevant recipients.

Here is the VB code that was used to keep track of all the totals in the Script Task:

' Microsoft SQL Server Integration Services Script Task' Write scripts using Microsoft Visual Basic' The ScriptMain class is the entry point of the Script Task.

Imports SystemImports System.DataImports System.MathImports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

' The execution engine calls this method when the task executes.' To access the object model, use the Dts object. Connections,

variables, events,' and logging features are available as static members of the Dts class.

9 | P a g e

Page 10: B Woodward Portfolio

' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.

' ' To open Code and Text Editor Help, press F1.' To open Object Browser, press Ctrl+Alt+J.

Public Sub Main()'

Dts.Variables("TotalClosedJobRows").Value = _ CInt(Dts.Variables("TotalClosedJobRows").Value) + CInt(Dts.Variables("ClosedJobRows").Value)

Dts.Variables("TotalExistingRows").Value = _ CInt(Dts.Variables("TotalExistingRows").Value) + CInt(Dts.Variables("ExistingRows").Value)

Dts.Variables("TotalNewRows").Value = _ CInt(Dts.Variables("TotalNewRows").Value) + CInt(Dts.Variables("NewRows").Value)

Dts.Variables("TotalSourceRows").Value = _ CInt(Dts.Variables("TotalSourceRows").Value) + CInt(Dts.Variables("SourceRows").Value)

'Dts.TaskResult = Dts.Results.Success

End Sub

End Class

10 | P a g e

Page 11: B Woodward Portfolio

Data Flow

Like the previous package this package also converts, totals, imports or updates the data into the correct table. The data is also checked for errors and missing information and logged.

11 | P a g e

Page 12: B Woodward Portfolio

SQL Server Analysis Services

Overview of Goals for SSAS portion

There are three phases to the SSAS Project:

1. Create an SSAS solution in BIDS, and build four views/cubes for Project (“Job”) Master, Project Overhead, Project Materials, and Project Labor.

2. A workshop on SSAS queries

3. Build 5 KPIs (covered in this document)

4. Deliverables for this:

a. The SSAS solution from BIDS

• Transform the OLTP database to a OLAP cube

b. The MDX queries that you create for each of the four views

• Create the calculated members for the cube

c. A screenshot of the results from each Excel KPI test (5 screen shots)

• Kpi1 through KPI5 (jpg, bmp)

12 | P a g e

Page 13: B Woodward Portfolio

Screenshot of Data Source View

This DSV was created in BIDS, it shows the 4 fact tables

13 | P a g e

Page 14: B Woodward Portfolio

:Sample MDX queries with resultsRetrieve and calculate the total costs, the total profit,and total profit %, for each individual job. The three are calculated as follows:Total costs = total labor cost + total material cost + total overhead costTotal profit = labor profit + material profit + additional labor overhead profitTotal profit % = (total profit / (total cost + total profit)) * 100

WITH MEMBER [Total Cost] AS ([Total Labor Cost] + [Total Material Cost] + [Total Overhead]), format_string = 'currency'MEMBER [Total Profit] AS ([Total Labor Profit] + [Total Material Profit] + [Additional Labor Profit]), format_string = 'currency'MEMBER [Total Profit %] ASiif ([Total Cost] = 0,0,[Total Profit] / ([Total Cost] + [Total Profit])), FORMAT_STRING = 'percent'

SELECT{[Total Cost], [Total Profit], [Total Profit %]}on columns, non emptyDescendants([Job Master].[Description],[Job Master].[Description], self_and_before) on rows from [All Works Cube]

14 | P a g e

Page 15: B Woodward Portfolio

Show Overhead by Overhead Category for Q3 and Q4 2005,and also show the % of change between the two

WITHMEMBER[2005_Q3] AS ([Weekly Over Head], [All Works Calendar].[Fy Qtr].PrevMember),format_string = 'currency'MEMBER[%change] AS iif([2005_Q3] ,([Weekly Over Head]-[2005_Q3])/[2005_Q3],'N/A'),format_string = 'percent'MEMBER[2005_Q4] AS [Weekly Over Head],format_string = 'currency'

SELECT {[2005_Q3],[2005_Q4],[%change]}on columns, non emptydescendants([Overhead].[Description],[Overhead].[Description], self_and_before)on rowsfrom [All Works Cube]WHERE [All Works Calendar].[Fy Qtr].[2005 Q4]

15 | P a g e

Page 16: B Woodward Portfolio

16 | P a g e

Page 17: B Woodward Portfolio

Show Material purchase amounts for 2005, broken out by Material Purchase type and client. (for instance, Fuel for client A, B, C…Petty Cash for client A, B, C, etc.)

WITH MEMBER[PurchaseAmount] AS [Purchase Amount], format_string = 'currency' SELECT[PurchaseAmount]on columns, non empty{{[Material Types].[Description].[Fuel],[Material Types].[Description].[Material],[Material Types].[Description].&[Petty Cash]}*[Clients].[Client Name].children}on rowsfrom[All Works Cube]WHERE [All Works Calendar].[Year].[2005]

17 | P a g e

Page 18: B Woodward Portfolio

Show the jobs in job order, and within the job show the employees in hours worked order

SELECT[HoursWorked]on columns, non empty generate (([Job Master].[Description].Children), CrossJoin({[Job Master].[Description].CurrentMember}, Topcount([Employees].[Full Name].Children,3,[HoursWorked])),ALL)on rowsfrom[All Works Cube]WHERE [All Works Calendar].[Year].[2005]

18 | P a g e

Page 19: B Woodward Portfolio

Sample KPIs

KPI2 – KPIIncr#ofJobs

Increase in number of Jobs from the previous period to the current period (quarter is the period in this example)

Green = 0 or greater

Red = Less the 0

19 | P a g e

Page 20: B Woodward Portfolio

KPI 4 - KPIProfit

Profit % (Total Profit / (Total Cost + Total Profit))

Total Profit = Total Labor Profit + Total Material Profit + Additional Labor Profit

Total Costs = Total Labor Cost + Total Material Cost + Total Overhead

Green = Greater than 15%

Yellow = Greater than 5%, less than or equal to 15%

Red = Less than or equal to 5%

20 | P a g e

Page 21: B Woodward Portfolio

21 | P a g e

Page 22: B Woodward Portfolio

KPI5 – KPIOverheadTrend

% Increase in Overhead category from one period to another(in this case period is Quarter)

Green = 0-10%

Yellow = Greater then 10%, less then or equal to 15%

Red = Greater than 15%

22 | P a g e

Page 23: B Woodward Portfolio

Miscellaneous Projects in Sharepoint

Performance point Gauges and Chart deployed to Sharepoint

Gauge Scorecard with on condition chart on right

23 | P a g e

Page 24: B Woodward Portfolio

24 | P a g e

Page 25: B Woodward Portfolio

SSRS deployed to Sharepoint

Using the cell formatting capabilities of Reporting Services

25 | P a g e

Page 26: B Woodward Portfolio

4 PPS dashboard containing pages

Dual “y” axis report.

26 | P a g e