Escolar Documentos
Profissional Documentos
Cultura Documentos
1 | Page
Table of Contents
1
Overview
.
2 Basic Data Model Design
Concepts..
3 Basic Data Model
Design
.
3.1 Basic Data
Model
.
3.2 Base Tables in the Data
Model..
3.2.1 Call Center
Agent
..
3.2.2 Call Center Service Call Type..
4
4
4
4
5
5
6
6
7
7
8
8
9
9
10
11
12
12
13
13
14
14
14
15
15
16
17
17
18
18
19
20
22
23
24
26
26
28
28
30
32
2 | Page
3.2.13 Marketing
Calendar.
.
3.2.14 Marketing
Campaigns.
3.2.15 Marketing
Channels.
3.2.16 Marketing Referral
Sources
3.2.17 Order
Method
..
3.2.18
Product
.
3.2.19 Sales
Calendar
.
3.2.20 Sales Finance
Fact.
3.2.21 Sales Marketing
Fact..
3.2.22 Sales Pipeline
Calendar..
3.2.23 Sales Quotas
Fact..
3.3 Marketing Campaign Performance - Modification of
base data model
4 Raw
Data
..
4.1 Customer Folder Raw
Data.
4.2 Customer Service Folder Raw
Data
4.3 Finance Folder Raw
Data..
4.4 HR Folder Raw
Data
..
4.5 Marketing Folder Raw
Data.
4.6 Products Folder Raw
Data.
4.7 Sales Folder Raw
33
34
37
38
39
40
41
3 | Page
Data..
5.1 Customers
Tab
..
5.2 Sales
Tab
5.3 Finance
Tab
.
5.4 Pipeline
Tab
.
5.5 Marketing
Tab
...
5.6 Employees
Tab
5.7 Products
Tab
4 | Page
1. Overview
This document is the reference guide for the data model used for the Core Demo
Platform.
The tables, fields, joins, QVD, and data creation process will be
documented in the following sections. This common data model is used to feed all
the applications that are part of the Core Demo Platform demo system.
So yes, its really hard to read (no worries, well break it up in detail) but it
illustrates the complexity of the various data elements connected together to build
the platform.
There are 30+ raw tables that were combined together into the 23 tables below in
5 | Page
order to create this final data model. The raw data tables will be covered later in
the document along with the QVD creation process to build the above data model.
NOTE: The applications Marketing Campaign Performance has a modified data
model to accommodate the requirements of externally generated leads and an
outsourced marketing operational group. This modification is covered in section
3.3.
3.2 Base Tables in the Data Model
Here is a breakdown of the tables included in the data model for the published
applications. Each table will be identified with its Key(s), Dimension field, Measure
field, and description of which application its used within. The name will include
the tables full name, [Dimension/Fact] indicator, and (Name) which is what the
table is called in the actual data model.
3.2.1) Call Center Agent, [Dimension] - (CallCenterAgents) This table is a
lookup table for the Call Center Fact table that describes details about the call
center agents and related information about them.
Keys
Dimension
s
zAgentID
Connects to CallCenterFact
Agent Name
Agent Country
Keys
zSVCTYPEKEY
Connects to CallCenterFact
Dimension
3.2.3) Call Center Fact, [Fact] - (CallCenterFact) This is the primary fact
table for all the Call Center Metrics in the Call Center Applications.
zGRPKEY
Connects to CallCenterGroup
zCALLSEVKEY
Connects to CallCenterSeverity
zAgentID
Connects to CallCenterAgents
zORGKEY
zCallCtrHandleTypeID
Connects to CallCtrHandleType
zSVCTYPEKEY
Connects to CallCenterCallType
Keys
Dimension
s
7 | Page
Measures
8 | Page
Keys
zGRPKEY
Connects to CallCenterFact
Dimension
s
Keys
zCallCtrHandleTypeID
Connects to CallCenterFact
Dimension
s
9 | Page
Keys
zCALLSEVKEY
Connects to CallCenterFact
Dimension
s
Keys
zORGKEY
Dimension
s
Company Industry
Lead Source
Company Annual
Spend
Company Employee
Count
Company Tier
Company Primary
Channel
Company Annual
Revenue
Company Channel
10 | P a g e
Preference
communication
Company Twitter
Handle
Company Tenure
Company Region
Company Country
Company GeoKey
Company Zip
Company City
Company Name
Company Street
Address
Measures
Keys
zMarketingCompetitorI
D
Connects to SalesMarketingFact
Dimension
s
Competitor
11 | P a g e
3.2.9) Customer, [Dimension] - (Customer) This table details the B2C (direct
to consumer) customers we service with description of the related attributes for
each B2C customer.
Keys
zCONTACTKEY
Dimension
s
Customers Age
Customer DOB
Customer Name
CustomerHousehold
Size
Customer Email
Customer Homeowner
Customer Marital
Status
Customer Contact
Preference
Customer Annual
Income
Customer Status
Customer Tier
Customer Age
Customer Education
Level
Customer Gender
12 | P a g e
Dimension
s
Customer Ethnicity
Ethnicity of customer
Customer Tenure
Customer Zip/Postal
Customer City
Company Street
Address
Customer
State/Province
Customer Country
CustomerGeoKey
Customer Update
Status Date
Company Industry
Company Annual
Spend
Company Employee
Count
Company Primary
Channel
Company Annual
Revenue
Company Twitter
Handle
13 | P a g e
Measures
Company Name
Company Street
Address
Keys
zEMPKEY
Dimension
s
Employee City
Employee Name
Employee Gender
Employee Area
Employee Dept
Employee Business
Unit
Employee Region
Employee Country
Employee State
14 | P a g e
Employee DOB
Employee Manager
Employee Employment
Type
Employee Band
Employee Ethnicity
Employees ethnicity
Employee Termination
Date
Employee Termination
Month
Employee Termination
Year
Employee Age
Age of employee
Employee Tenure
Employee Recruitment
Source
15 | P a g e
Dimension
s
Employee Referral
Source
Employee Termination
Type
Employee Termination
Reason
Employee Salary
Employee Total
Compensation
EmployeeGeoPoint
Keys
Dimension
s
Measures
zEMPKEY
16 | P a g e
Keys
Dimension
zDemandEmpID
Connects to SalesFinanceFact
Finance Demand
Director
Finance Demand
Manager
Finance Demand
Planner
Keys
MarketingDate
Connects to SalesMarketingFact
Dimension
s
MarketingYear
MarketingMonth
MarketingMonthYear
MarketingQuarter
MarketingCY
17 | P a g e
year
MarketingLY
MarketingCQ
MarketingLQ
MarketingCM
MarketingLM
Keys
zMarketingCampaignID
Connects to SalesMarketingFact
Dimension
s
Marketing Campaign
Date
Marketing Campaign
Objective
Marketing Owner
Marketing Sector
Marketing Status
Marketing Campaign
Sub Type
18 | P a g e
Marketing Campaign
Theme
Marketing Campaign
Topic
Marketing Campaign
Type
Marketing Campaign
Target Job Function
Marketing Campaign
Target LOB
Marketing Method
Marketing Campaign
Opportunity Name
Marketing Campaign
Influence
Marketing Owner
Function
Keys
zMarketingChannelID
Connects to SalesMarketingFact
Dimension
s
Marketing Channel
19 | P a g e
3.2.16) Marketing Referral Sources [Dimension] (MarketingReferralSources) This table contains the inbound marketing lead
description system.
Keys
zMarketingReferrralSou
rceID
Connects to SalesMarketingFact
Dimension
s
Marketing Referral
Source
Keys
zOMKEY
Connects to SalesFinanceFact
Dimension
s
Keys
zPKEY
Connects to SalesFinanceFact
Dimension
s
Product Category
20 | P a g e
Product Group
Product Vendor
Product Name
Product Model
Product Price
Product Weight
Weight of Product
Keys
Connects to SalesFinanceFact
Dimension
s
Sales Year
Sales Month
Sales MonthYear
Sales Quarter
Sales CY
Sales LY
Sales CQ
21 | P a g e
quarter
Sales LQ
Sales CM
Sales LM
Keys
Dimension
zCONTACTKEY
Connects to SalesCalendar
zPKEY
Connects to Product
zORGKEY
zOMKEY
Connects to OrderMethod
zDemandEmpID
Connects to FinancialPlanners
zSOKEY
zQKEY
zCUSTKEY
zPROMOKEY
zBRKEY
22 | P a g e
Measures
Sales Quantity
Sales Revenue
Sales Forecast
Sales Costs
Keys
zMarketingReferralSour
ceID
Connects to MarketingReferralSources
23 | P a g e
zMarketingChannellID
Connects to MarketingChannels
zMarketingCampaignID
Connects to MarketingCampaigns
Marketing Date
Connects to MarketingCalendar
zEMPKEY
Connects to SalesPipelineCalendar
zMarketingCompetitorI
D
Connects to Competitors
zCONTACTKEY
zQUOTAKEY
Connects to SalesQuotasFact
zMarketingPageID
Marketing Campaign
Conversion Date
Dimension
s
Measures
Sales Stage
Sales Won/Lost
Sales Closed
Marketing Leads
# of leads
Marketing Conversions
Marketing Calls
Marketing Cost
Marketing Visitors
24 | P a g e
Marketing Unique
Visitors
Sales Opportunity
Amount
Keys
Dimension
s
Connects to SalesMarketingFact
Sales Pipeline
MonthYear
Sales Pipeline CY
Sales Pipeline LY
Sales Pipeline CQ
Sales Pipeline LQ
Sales Pipeline CM
Sales Pipeline LM
25 | P a g e
Keys
zQUOTAKEY
Connects to SalesFinanceFact
Measures
Sales Quota
26 | P a g e
4. Raw Data
This section will detail the raw data imports used to build the CDP applications.
These files are contained in excel files, with multiple tabs in each organized by
source type.
4.1) Customer Folder Raw Data Contains Contact and Customer master excel
files. In this folder, there are two excel files: CDPCustomerMaster.xlsx and
CDPCustomerMaster.xlsx.
4.1.1) CDP Customer Master (2500 records) Customer Master is a list
of companies that buy/sell products through various channels.
Fields:
-marketCap
-avgClickStreamPageDuration
-industrySector
-leadSource
-annualSpend
-eMailOptOutFlag
-employeeCount
-tier
-primaryChannel
emailOnFile
-annualRevenue
-contactChannelPreference
-hasTwitterHandle
-companyId
-webLoginDuration
-customerSinceDate
-Region
-Country
-Zip
27 | P a g e
-City
-CompanyName
-StreetAddress
-Latitude
-Longitude
4.1.2) CDP Contact Master (18372 records) Contact Master is a list of
individual customers that have purchased product directly.
Fields:
-dateOfBirth
-leadSource
-avgWebsiteVisit
-houseHoldSize
-maritalStatus
-ownHomeFlag
-annualIncome
-customerId
-accountStatus
-educationLevel
-age
-customerTier
-gender
-emailOptOut
-firstName
-lastName
-emailDomain
-contactPreference
-customerSinceDate
-ethnicity
-AddressLine1
-City
-PostalCode
-State / Province
-Country
-CountryISOCode
-Latitude
-Longitude
-Status Date
4.2) Customer Service Folder Raw Data - Contains Call Center Fact excel file.
In this spreadsheet are tabs for Call Center Fact, Handle Type, Agent, Group, Service
Type, and Call Severity. There are other tabs but they are unused.
4.1.1) Call Center Fact (10995 records) contains the keys, dimensions, and
measure for all the call center metrics
28 | P a g e
Fields:
-Date_ID
-Time_ID
-Close Date
-Days to Resolve
-Days Aging
-Agent_ID
-HandleTypeID
-Product_ID
-Group_ID
-Service_Type_ID
-Call_Severity_ID
-Customer_ID
-Case #
-# Call
-# Terminated
-# Completed
-# Active Agent
-Call Duration
-Avg Hold Time
-Call Costs
-Hold Time with SLA
-Hold Time Mising SLA
-Call Duration within SLA
-Call Duration missing SLA
-Satisfaction Level
-Quality Level
-Tech Level
4.1.2) HandleType (3 records) contains lookups for call center fact
Fields:
-HandleTypeID
-Handle Type
4.1.3) Agent (99 records) contains lookups for call center fact around agents
Fields:
-Agent ID
-Territory
-Country
-Call Center
-Manager
-Team Lead
-Agent
City
4.1.4) Group (5 records) contains lookups for call center fact around groups
29 | P a g e
Fields:
-GroupID
-Group
4.1.5) Service_Type (15 records) contains lookups for call center fact around
service types
Fields:
-Service_TypeID
-Service_Type
4.1.6) Call_Severity (3 records) contains lookups for call center fact around
severity
Fields:
-Call_SeverityID
-Call_Severity
4.3) Finance Folder Raw Data - Contains Expenses excel file. This spreadsheet
has T&E information for Employees
4.3.1) Finance Expenses (86803 records) contains the keys, dimensions, and
measure for all the finance T&E fact.
Fields:
-Billable
-EmployeeID
-Expense Type
-Expense Category
-Expense Report
-Expense Report Exception
-Exception Reason
-Year
-Quarter
-Period
-Month
-Date
-Amount
-Budget
-Budget1
4.4) HR Folder Raw Data - Contains the HR excel file. This spreadsheet tabs for
Employee information and Demand Planners.
4.4.1) Employee (1815 records) contains employee details
Fields:
-Employee State
30 | P a g e
-Employee City
-Date of Birth
-Job Classification
-Manager
-Employment Type
-Band
-Performance Rating
-Ethnicity
-Hire Date
-Active
-Recruitment Source
-Referral Source
-Termination Date
-Termination Type
-Termination Reason
-Salary
-Compensation
-EmployeeLatitude
-EmployeeLongitude
4.4.2) Demand Planners (75 records) contains demand planner employee
management details
Fields:
-DemandEmplD
-Demand Director
-Demand Manager
-Demand Planner
4.5) Marketing Folder Raw Data - Contains the marketing excel file. This
spreadsheet tabs for MarketingFact, Campaigns, Channel, Leads, Pipeline, and
Competitor.
4.5.1) MarketingFact (160350 records) contains the main fact for marketing
information.
Fields:
-SALES_ORDER_KEY
-CampaignID
-ChannelID
-CUSTOMERID
-ReferralSourceID
-Sales Create Date
-Sales Close Date
-Conversion Date
-PageID
31 | P a g e
-Visits
-Conversions
-Calls
-Campaign Cost
-PageID
-Visitors
-Unique Visitors
-PageRank
-Opportunity Age
-Sales Stage
-IsWon
-IsClosed
-CompetitorID
-Stage Duration
-Opportunity Amt
-zEMPKEY
4.5.2) Campaigns (2269 records) contains the campaign details information
Fields:
-CampaignID
-Campaign Start Date
-Campaign Objective
-Campaign Owner
-Campaign Sector
-Campaign Status
-Campaign Sub Type
-Campaign Theme
-Campaign Topic
-Campaign Type
-Campaign Group
-Employee Range
-Campaign Job Function
-Campaign Line of Business
-Campaign Method
-Campaign Name
-Campaign Influence
-Campaign Owner Function
4.5.3) Channel (3 records) contains the channel details
Fields:
-ChannelID
-Channel
4.5.4) Leads (24 records) contains the lead source details
Fields:
32 | P a g e
-ReferralSourceID
-ReferralSource
4.5.5) Pipeline (50692 records) contains the details for the sales pipeline
Fields:
-StartDate (subtract from Close Date)
-CampaignID
-Sales Stage
-IsWon
-IsClosed
-CompetitorID
-Stage
-Duration
-Opportunity Amt
-zEMPKEY
4.5.6) Competitor (7 records) contains the details on competitors
-CompetitorID
-Competitor
4.6) Products Folder Raw Data - Contains the products excel file.
4.6.1) Product_DIM (1977 records) contains the product details
-PRODUCT_KEY
-PRODUCT_CATEGORY
-PRODUCT_SUBCAT
-PRODUCT_GROUP
-PRODUCT_VNDR
-PRODUCT
-PRODUCT_MDL
-UNITCOST
-UNITPRICE
-PRODUCTWEIGHT
4.7) Sales Folder Raw Data - Contains the sales fact excel file (also tab for order
methods) and sales quotas excel file.
4.7.1) SalesFinanceFace (201594 records) contains the sales fact details
-PRODUCT_KEY
-SALES_ORDER_KEY
-Year
-ORDER_DAY (test)
-ORDER_DAY
-QUOTA_KEY
-ORGANIZATION_KEY
-EMPLOYEE_KEY
-DemandPlannerID
33 | P a g e
-EMPLOYEE_KEY (Rand)
-CUSTOMER_KEY (orig)
-CUSTOMER_KEY
-PROMOTION_KEY
-ORDER_METHOD_KEY
-BRANCH_KEY
-SHIPPING_DAY
-CLOSE_DAY
-QTY_ORDERED
-SALE_PRICE_UNIT
-GROSS_MARGIN
-TOTAL_SALE_REVENUE
-COSTS (orig)
-COSTS
-GROSS_PROFIT
-ORDER_DETAIL_LINE
-ORDER_NUMBER
-QUOTAPRODUCT
-PRODUCT_MDL
-RETURN
-SHIPMENT_TYPE
-FORECAST
4.7.2) OrderMethods (3 records) contains the order method details
-ORDER_METHOD_KEY
-Order Method
4.7.3) SalesFinanceFace (4049 records) contains the sales fact details
-zEMPKEY
-Quota
-MonthYear
-Closed Revenue
-Sales Quota
-Quota %
to build the CDP applications. The script and transformations will be documented
below.
5.0.1) Script Layout the script for the QVD builder is broken into subject
areas and the last tab being where all the QVDs are being written out.
35 | P a g e
customerId as zCONTACTKEY,
accountStatus as [Customer Status],
customerTier as [Customer Tier],
"age" as [Customer Age],
educationLevel as [Customer Education Level],
gender as [Customer Gender],
emailOptOut as [Customer Email Opt Out],
ethnicity as [Customer Ethnicity],
Floor(year(Today()) - year(customerSinceDate)) as [Customer Tenure],
PostalCode as [Customer Zip/Postal],
City as [Customer City],
"State / Province" as [Customer State/Province],
Country as [Customer Country],
GeoMakePoint(Latitude, Longitude) as [Customer Geokey],
date([Status Date]) as [Customer Update Status Date]
FROM [lib://Core Data/Customer\CDPContactMaster.xlsx]
(ooxml, embedded labels, table is Contacts18372);
Company:
LOAD
marketCap as [Company Market Cap],
avgClickStreamPageDuration as [Marketing Avg Click Stream Page
Duration],
industrySector as [Company Industry],
leadSource as [Lead Source],
36 | P a g e
37 | P a g e
5.2) Sales Tab: Transformations for the sales and orders raw tables into
QVDs. This process also creates a Sales master calendar.
SalesFinanceFact:
LOAD
PRODUCT_KEY as zPKEY,
SALES_ORDER_KEY as zSOKEY,
date(ORDER_DAY) as [Sales Order Date],
//date#(ORDER_DAY,'YYYYMMDD') as [Sales Order Date],
QUOTA_KEY as zQKEY,
ORGANIZATION_KEY as zORGKEY,
EMPLOYEE_KEY as zEMPKEY,
CUSTOMER_KEY as zCUSTKEY,
CUSTOMER_KEY as zCONTACTKEY,
DemandPlannerID as zDemandEmpID,
PROMOTION_KEY as zPROMOKEY,
ORDER_METHOD_KEY as zOMKEY,
BRANCH_KEY as zBRKEY,
38 | P a g e
39 | P a g e
)
)
)
AS [Sales Order Days Aging Bucket],
'(6) >100')
//
//
//
//
//
)
)
AS [Sales Order Days Aging Bucket],
40 | P a g e
OrderMethod:
LOAD
ORDER_METHOD_KEY as zOMKEY,
"Order Method" as [Sales Order Method]
FROM [lib://Core Data/Sales\SALES_FACT_UPDATE.xlsx]
(ooxml, embedded labels, table is OrderMethods);
// Sales CALENDAR
TEMP:
LOAD
41 | P a g e
DateIsland:
LOAD
date($(vMinSalesDate) + rowno() - 1) AS D,
year($(vMinSalesDate) + rowno() - 1) AS Y,
month($(vMinSalesDate) + rowno() - 1) AS M,
date(monthstart($(vMinSalesDate) + rowno() - 1), 'MMM-YYYY') AS MY
AUTOGENERATE
vMaxSalesDate - vMinSalesDate + 1;
LET vToday = vMaxSalesDate;
42 | P a g e
//
Year flags
inyear(D, '$(vToday)', 0) * -1 AS [Sales CY], //Current year
inyear(D, '$(vToday)', -1) * -1 AS [Sales LY],
//
Quarter flags
inquarter(D, '$(vToday)', 0) * -1 AS [Sales CQ], //Current quarter
//
Month flags
inmonth(D, '$(vToday)', 0) * -1 AS [Sales CM],
//Current month
//Previous month
RESIDENT
DateIsland;
DROP TABLE DateIsland;
43 | P a g e
5.3) Finance Tab: Transformations for the Finance TE raw tables into QVDs.
FinanceTEFact:
LOAD
Billable as [Finance T&E Billable],
EmployeeID as zEMPKEY,
"Expense Type" as [Finance T&E Type],
"Expense Category" as [Finance T&E Category],
date("Date") as [Finance T&E Date],
monthname("Date") as [Finance T&E Period],
month("Date") as [Finance T&E Month],
Quarter as [Finance T&E Quarter],
year("Date") as [Finance T&E Year],
Amount as [Finance T&E Amount],
Budget1 as [Finance T&E Budget]
FROM [lib://Core Data/Finance\Expenses.xlsx]
(ooxml, embedded labels, table is [Finance Expenses]);
44 | P a g e
FinancialPlanners:
LOAD
DemandEmplD as zDemandEmpID,
"Demand Director" as [Finance Demand Director],
"Demand Manager" as [Finance Demand Manager],
"Demand Planner" as [Finance Demand Planner]
FROM [lib://Core Data/HR\Employees.xlsx]
(ooxml, embedded labels, table is [Demand Planners]);
5.3) Pipeline Tab: Transformations for the pipeline, quotas, and competitor
raw tables into QVDs.
QuotasFacts:
LOAD
//zEMPKEY,
zEMPKEY & '-' & monthname("Sales Close Date") as zQUOTAKEY,
"Sales Close Date" as [Quota Date],
Quota as [Sales Quota]
FROM [lib://Core Data/Sales\Quotas.xlsx]
(ooxml, embedded labels, table is Quotas);
PipelineFact:
LOAD
"StartDate (subtract from Close Date)" as [Sales Duration],
45 | P a g e
CampaignID as zMarketingCampaignID,
"Sales Stage" as [Sales Stage],
IsWon as [Sales Won/Lost],
if(IsWon = '1', 'Won',
if((IsClosed = '1' AND IsWon = '0'), 'Lost',
'Open')) as [Sales Opp Status],
IsClosed as [Sales Closed],
CompetitorID as zMarketingCompetitorID,
"Stage Duration" as [Sales Stage Duration],
"Opportunity Amt" as [Sales Opportunity Amount]
FROM [lib://Core Data/Marketing\Marketing.xlsx]
(ooxml, embedded labels, table is Pipeline);
Competitors:
LOAD
CompetitorID as zMarketingCompetitorID,
Competitor
FROM [lib://Core Data/Marketing\Marketing.xlsx]
(ooxml, embedded labels, table is Competitor);
MarketingFact:
46 | P a g e
LOAD
//SALES_ORDER_KEY as zSOKEY,
CampaignID as zMarketingCampaignID,
// CUSTOMERID as zCONTACTKEY,
ReferralSourceID as zMarketingReferralSourceID,
ChannelID as zMarketingChannelID,
PageID as zMarketingPageID,
date([Campaign Response Date]) as [Marketing Date],
//
monthname([Campaign Response Date]) as [Campaign Response
Month],
//
//
47 | P a g e
MarketingCampaigns:
LOAD
CampaignID as zMarketingCampaignID,
"Campaign Start Date" as [Marketing Campaign Date],
"Campaign Objective" as [Marketing Campaign Objective],
"Campaign Owner" as [Marketing Owner],
"Campaign Sector" as [Marketing Sector],
"Campaign Status" as [Marketing Status],
"Campaign Sub Type" as [Marketing Campaign Sub Type],
"Campaign Theme" as [Marketing Campaign Theme],
"Campaign Topic" as [Marketing Campaign Topic],
"Campaign Type" as [Marketing Campaign Type],
"Campaign Group Employee Range" as [Marketing Campaign Target
Employee Range],
"Campaign Job Function" as [Marketing Campaign Target Job Function],
"Campaign Line of Business" as [Marketing Campaign Target LOB],
"Campaign Method" as [Marketing Method],
"Campaign Name" as [Marketing Campaign],
"Campaign Name" as [Opportunity Name],
"Campaign Influence" as [Marketing Campaign Influence],
"Campaign Owner Function" as [Marketing Owner Function]
FROM [lib://Core Data/Marketing\Marketing.xlsx]
(ooxml, embedded labels, table is Campaigns);
48 | P a g e
MarketingChannels:
LOAD
ChannelID as zMarketingChannelID,
Channel as [Marketing Channel]
FROM [lib://Core Data/Marketing\Marketing.xlsx]
(ooxml, embedded labels, table is Channel);
MarketingReferralSources:
LOAD
ReferralSourceID as zMarketingReferralSourceID,
ReferralSource as [Marketing Referral Source]
FROM [lib://Core Data/Marketing\Marketing.xlsx]
(ooxml, embedded labels, table is Leads);
49 | P a g e
// Marketing CALENDAR
TEMP:
LOAD
num(floor(min([Marketing Date]))) AS MinCampaignDate,
num(floor(max([Marketing Date]))) AS MaxCampaignDate
RESIDENT
MarketingFact;
DateIsland:
LOAD
date($(vMinCampaignDate) + rowno() - 1) AS D,
year($(vMinCampaignDate) + rowno() - 1) AS Y,
month($(vMinCampaignDate) + rowno() - 1) AS M,
date(monthstart($(vMinCampaignDate) + rowno() - 1), 'MMM-YYYY') AS
MY
AUTOGENERATE
vMaxCampaignDate - vMinCampaignDate + 1;
50 | P a g e
MarketingCalendar:
LOAD
//D AS %link_Date,
D AS [Marketing Date],
//
//
Year flags
inyear(D, '$(vToday)', 0) * -1 AS [Marketing CY],
//Current year
//First prior
year
//
Quarter flags
//Current
//First prior
//
Month flags
51 | P a g e
//Current
//Previous
month
month
RESIDENT
DateIsland;
5.5) Employee Tab: Transformations for the employees tables into QVDs.
Employees:
LOAD
EmployeeID as zEMPKEY,
EmployeeName as [Employee Name],
Gender as [Employee Gender],
Area as [Employee Area],
Department as [Employee Dept],
"Business Unit" as [Employee Business Unit],
"Job Title" as [Employee Job Title],
"Employee Region" as [Employee Region],
"Employee Country" as [Employee Country],
"Employee State" as [Employee State],
"Employee City" as [Employee City],
"Date of Birth" as [Employee DOB],
52 | P a g e
53 | P a g e
5.6) Product Tab: Transformations for the product table into QVDs.
Product:
LOAD
PRODUCT_KEY as zPKEY,
PRODUCT_CATEGORY as [Product Category],
PRODUCT_SUBCAT as [Product Sub Category],
PRODUCT_GROUP as [Product Group],
PRODUCT_VNDR as [Product Vendor],
PRODUCT as [Product Name],
PRODUCT_MDL as [Product Model],
UNITCOST as [Product Unit Cost],
UNITPRICE as [Product Unit Price],
54 | P a g e
5.7) Customer Service: Transformations for the call center and customer
service excel files into QVDs.
CallCenterFact:
LOAD
date(Date_ID) as [Call Ctr Call Date],
MonthName(Date_ID) as [Call Ctr Call Month],
55 | P a g e
Product_ID as PRODUCT_KEY,
timestamp(Time_ID) as [Call Ctr Call Time],
hour(Time_ID) as [Call Ctr Call Hour],
"Case #" as [Call Ctr Ticket #],
Group_ID as zGRPKEY,
Service_Type_ID as zSVCTYPEKEY,
Call_Severity_ID as zCALLSEVKEY,
Customer_ID as zORGKEY,
"# Call" as [Call Ctr Call #],
"# Completed" as [Call Ctr Completed #],
"# Terminated" as [Call Ctr Terminated #],
"# Active Agent" as [Call Ctr Active Agent #],
"Call Duration" as [Call Ctr Call Duration],
"Avg Hold Time" as [Call Ctr Avg Hold Time],
"Call Costs" as [Call Ctr Call Costs],
"Hold Time with SLA" as [Call Ctr Hold Time w/ SLA],
"Hold Time Mising SLA" as [Call Ctr Hold Time w/o SLA],
"Call Duration within SLA" as [Call Ctr Call Duration within SLA],
56 | P a g e
CallCenterGroup:
LOAD
Group_ID as zGRPKEY,
"Group" as [Call Center Group]
FROM [lib://Core Data/Customer Service\Call Center.xlsx]
(ooxml, embedded labels, table is Group);
CallCenterCallType:
LOAD
Service_Type_ID as zSVCTYPEKEY,
Service_Type as [Call Center Service Type]
FROM [lib://Core Data/Customer Service\Call Center.xlsx]
(ooxml, embedded labels, table is Service_Type);
CallCenterSeverity:
LOAD
Call_Severity_ID as zCALLSEVKEY,
57 | P a g e
CallCenterAgents:
LOAD
EmployeeID as AgentID,
EmployeeName as [Call Ctr Agent],
"Employee Country" as [Call Ctr Country],
"Employee City" as [Call Ctr Location]
FROM [lib://Core Data/HR\Employees.xlsx]
(ooxml, embedded labels, table is Employees);
5.8) QVD Builders: This tab is what writes the conformed in-memory
tables into QVDs.
// QVDs
// Dimensions
store * from Customer into [lib://Core Data/QVDs/Dimensions/Customer.qvd];
store * from Company into [lib://Core Data/QVDs/Dimensions/Company.qvd];
store * from OrderMethod into [lib://Core
Data/QVDs/Dimensions/OrderMethod.qvd];
store * from Employees into [lib://Core
Data/QVDs/Dimensions/Employees.qvd];
store * from Product into [lib://Core Data/QVDs/Dimensions/Product.qvd];
store * from FinancialPlanners into [lib://Core
Data/QVDs/Dimensions/FinancialPlanners.qvd];
58 | P a g e
// Calendars
store * from SalesCalendar into [lib://Core
Data/QVDs/Calendar/SalesCalendar.qvd];
store * from MarketingCalendar into [lib://Core
Data/QVDs/Calendar/MarketingCalendar.qvd];
// Fact Tables
store * from SalesFinanceFact into [lib://Core
Data/QVDs/Facts/SalesFinanceFact.qvd];
store * from FinanceTEFact into [lib://Core
Data/QVDs/Facts/FinanceTEFact.qvd];
store * from MarketingFact into [lib://Core
Data/QVDs/Facts/MarketingFact.qvd];
store * from PipelineFact into [lib://Core Data/QVDs/Facts/PipelineFact.qvd];
59 | P a g e
Below his is the list of QVDs used by the CDP applications. They are
segmented into three categories: Calendar QVDs, Dimensional QVDs, and
Fact QVDs
Dimensional QVDs
CallCenterAgents.qvd
CallCenterCallType.qvd
CallCenterGroup.qvd
CallCenterSeverity.qvd
Company.qvd
Competitors.qvd
Customer.qvd
Employees.qvd
FinancialPlanners.qvd
MarketingCampaigns.qvd
MarketingChannels.qvd
60 | P a g e
MarketingReferralSources.qvd
OrderMethod.qvd
Product.qvd
Calendars
MarketingCalendar.qvd
SalesCalendar.qvd
SalesPipelineCalendar.qvd
Fact Tables
CallCenterFact.qvd
FinanceTEFact.qvd
MarketingFact.qvd
PipelineFact.qvd
QuotasFact.qvd
SalesFinanceFact.qvd
61 | P a g e