Top Banner
Hong-Bing Li [email protected]
33
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ssis sql ssrs_ssas_sp_mdx_hb_li

Hong-Bing Li

[email protected]

Page 2: Ssis sql ssrs_ssas_sp_mdx_hb_li

Slide Contents

3 SQL Server Integration Services (SSIS)

8 SQL Programming

15 SQL Server Reporting Services (SSRS)

20 SQL Server Analysis Services (SSAS)

27 SharePoint Server 30 MDX Programming

This portfolio contains examples of my business intelligence

projects using Microsoft BI Product Stack.

Page 3: Ssis sql ssrs_ssas_sp_mdx_hb_li

SQL Server Integration Services (SSIS)

3

Page 4: Ssis sql ssrs_ssas_sp_mdx_hb_li

A new database “All Works” is setup as the staging area for the ETL process. A thorough understanding of the relationships between the tables in the following data diagram is important in determining the sequence of tables to be loaded and in enforcing referential integrity.

4

Page 5: Ssis sql ssrs_ssas_sp_mdx_hb_li

A Script Task is utilized to maintain multiple sets of variables with scripts in C#, for instance, one for keeping track of row counts of data processed dynamically at the

folder level, one for row counts at the file level.

Page 6: Ssis sql ssrs_ssas_sp_mdx_hb_li

One SSIS package is created to do ETL for one target table. The following illustrates the data processing within the Job Timesheets package: the data process pipeline starts by extracting data from a CSV file. The data is then conversed, processed and transformed (filter, remove duplicates, lookups, validate) as it passes through the pipeline, and is finally loaded into the target job timesheets table either as inserts or updates. It logs any rows that error out for review and correction. Similarly, seven more packages are generated for seven target tables.

6

Page 7: Ssis sql ssrs_ssas_sp_mdx_hb_li

7

A Sequence Container is deployed to run the eight ETL packages in sequence based on the relationships between the tables in the “All Works” Database to ensure referential integrity. If the eight packages are processed successfully, data maintenance tasks are performed. A success or failure notice email will be sent out depending on whether the data maintenance tasks are all successfully completed or not.A Master Package is created to contain the Sequence Container, the maintenance tasks and the email notices; then a SQL Server Agent Job is setup to run the Master Package on a predefined schedule to automate the entire data processing procedure.

Page 8: Ssis sql ssrs_ssas_sp_mdx_hb_li

SQL Programming

SQL Programming covers a broad range of content: Data Types and

Variables, Specialized Functions, Stored Procedures, Control-Of-Flow Operations,

Error Handling, Etc. Due to time/space constraints, I will illustrate only some of

the relatively new SQL functions/procedures/ programs that I have used in my

projects in the following:

1. Data Modification: OUTPUT clause, MERGE, select TOP(with ties) option

2. Aggregation: RANK() OVER (Partition by), GROUPING SETS

3. SQL Functions: PIVOT, CROSS APPLY

4. Common Table Expression (CTE), Correlated and Recursive Queries

5. User Defined Functions (UDF) that returns TABLE type

6. Error Handling Program:

Begin Try...End Try

Begin Catch...End Catch

Page 9: Ssis sql ssrs_ssas_sp_mdx_hb_li
Page 10: Ssis sql ssrs_ssas_sp_mdx_hb_li
Page 11: Ssis sql ssrs_ssas_sp_mdx_hb_li
Page 12: Ssis sql ssrs_ssas_sp_mdx_hb_li
Page 13: Ssis sql ssrs_ssas_sp_mdx_hb_li
Page 14: Ssis sql ssrs_ssas_sp_mdx_hb_li
Page 15: Ssis sql ssrs_ssas_sp_mdx_hb_li

SQL Server Reporting Services (SSRS)

15

Page 16: Ssis sql ssrs_ssas_sp_mdx_hb_li

16

Page 17: Ssis sql ssrs_ssas_sp_mdx_hb_li

17

Continued: Primary Dashboard

Page 18: Ssis sql ssrs_ssas_sp_mdx_hb_li

18

Page 19: Ssis sql ssrs_ssas_sp_mdx_hb_li

19

Whenever users make a selection on the "City" parameter, the cascading parameter "Product SKU" is processed immediately. Its values are filtered dynamically based on two factors:

A. Selected cities B. Product SKU with dollar Sales greater than “0 “

The technique to implement cascading parameters in SSRS using MDX, which is based on OLAP, is somewhat more complex than that using SQL, which is based on regular OLTP RDBMS.

Page 20: Ssis sql ssrs_ssas_sp_mdx_hb_li

SQL Server Analysis Services (SSAS)

20

Page 21: Ssis sql ssrs_ssas_sp_mdx_hb_li

21

The Development and Deployment of the All Works SSAS Cube Data Source View of the Star Schema

Page 22: Ssis sql ssrs_ssas_sp_mdx_hb_li

22

Browsing the All Works Cube Data

Page 23: Ssis sql ssrs_ssas_sp_mdx_hb_li

23

Definition of Calculated Members

Page 24: Ssis sql ssrs_ssas_sp_mdx_hb_li

24

Definition of Key Performance

Indicators (KPIs)

Page 25: Ssis sql ssrs_ssas_sp_mdx_hb_li

25

This is an example of a KPI developed from the AllWorks.cube, which is deployed to the Excel Spreadsheet for the end users. All the data in the cube, including all KPIs,

can be explored through the Pivot Table Field List.

Page 26: Ssis sql ssrs_ssas_sp_mdx_hb_li

Partitions Performed for the “All Works” Cube

Page 27: Ssis sql ssrs_ssas_sp_mdx_hb_li

SharePoint Server

27

Page 28: Ssis sql ssrs_ssas_sp_mdx_hb_li

Employee Labor Report Deployed to a SharePoint Server

Page 29: Ssis sql ssrs_ssas_sp_mdx_hb_li

configure security settings: give users/

groups appropriate permissions.

Page 30: Ssis sql ssrs_ssas_sp_mdx_hb_li

MDX Programming

30

Page 31: Ssis sql ssrs_ssas_sp_mdx_hb_li

MDX query for the primary dashboard (Slide 15 and 16 in SSRS Section)

Page 32: Ssis sql ssrs_ssas_sp_mdx_hb_li

This MDX Query shows two measures, Internet Sales Amount and Internet Freight Cost, are sliced against three dimensions:

Date (FY Year), Product and Customer (Country)

Page 33: Ssis sql ssrs_ssas_sp_mdx_hb_li

---The End---

Hong-Bing Li, February, 2015

Thank you for viewing this presentation!