SlideShare a Scribd company logo
1 of 19
EDW Star Schema
PK Violation
Troubleshooting
Made Easy
Bryan L. Mack
BI Developer/Team Lead
Colorado Community College
System
What’s the problem?
In Ellucian’s EDW – error records are written
off to a WKE_* table when they can’t be
inserted to the WTT_*_WKEYS table due to a
primary key error.
How do we find these troublesome records’
ODS data that is causing the PK violation?
The error you’ll see
The Hard Way
1) Find the constraint in the WKEYS table
The Hard Way
2) Find the fields in the PK
The Hard Way
3) Find the dimension tables associated with
each PK element. Use common sense to
do this, if you have none of that, use
deductive reasoning.
MULTI_SOURCE_KEY = WDT_MULTI_SOURCE
PERSON_UID = WDT_PERSON
ACADEMIC_TIME_KEY = WDT_ACADEMIC_TIME
The Hard Way
4) Build a SQL query using joins on the keys
from the WKE table & each of your
dimensions
The Hard Way
5) Use logic to replace (*) in your query from
step 4 with the fields you want to see.
WDT_MULTI_SOURCE = multi_source
WDT_ACADEMIC_TIME = academic_period
WDT_INSTRUCTOR = instructor_name
Etc.
Developing The Easy Way
That was way too much work.
We all love reusable code, right?
Good – let’s write some
Developing the Easy Way
1) Create table with the relevant fields you
want to see from each dimension should a
PK error occur. Sure, this will take you an
hour or so and is tedious; View it as an
investment.
Developing the Easy Way
2) Write a function to do everything else for
you.
Developing the Easy Way
Find the key columns & proper dimensions
Developing the Easy Way
Build your custom SQL block
Create your custom SELECT SQL statement
Developing the Easy Way
Build your custom SQL block
Developing the Easy Way
Building your custom SQL block
Using the Easy Way
1) Call your function with your WKE_* table
name as the sole input:
Using the Easy Way
The function creates your SQL for you
Using the Easy Way
2) Run that SQL
Questions?
Bryan L. Mack
bryan.mack@cccs.edu

More Related Content

Similar to EDW PK Violation Troubleshooting Made Easy

BIS 245 OUTLET Introduction Education--bis245outlet.com
BIS 245 OUTLET Introduction Education--bis245outlet.comBIS 245 OUTLET Introduction Education--bis245outlet.com
BIS 245 OUTLET Introduction Education--bis245outlet.comagathachristie291
 
BIS 245 Lessons in Excellence / bis245.com
BIS 245 Lessons in Excellence / bis245.comBIS 245 Lessons in Excellence / bis245.com
BIS 245 Lessons in Excellence / bis245.comkopiko33
 
BIS 245 Redefined Education--bis245.com
BIS 245 Redefined Education--bis245.comBIS 245 Redefined Education--bis245.com
BIS 245 Redefined Education--bis245.comagathachristie204
 
BIS 245 HOMEWORK Introduction Education--bis245homework.com
BIS 245 HOMEWORK Introduction Education--bis245homework.comBIS 245 HOMEWORK Introduction Education--bis245homework.com
BIS 245 HOMEWORK Introduction Education--bis245homework.comagathachristie256
 
BIS 245 HOMEWORK Lessons in Excellence--bis245homework.com
BIS 245 HOMEWORK Lessons in Excellence--bis245homework.comBIS 245 HOMEWORK Lessons in Excellence--bis245homework.com
BIS 245 HOMEWORK Lessons in Excellence--bis245homework.comthomashard72
 
BIS 245 HOMEWORK Become Exceptional--bis245homework.com
BIS 245 HOMEWORK Become Exceptional--bis245homework.comBIS 245 HOMEWORK Become Exceptional--bis245homework.com
BIS 245 HOMEWORK Become Exceptional--bis245homework.comKeatonJennings120
 
BIS 245 HOMEWORK Redefined Education--bis245homework.com
BIS 245 HOMEWORK Redefined Education--bis245homework.comBIS 245 HOMEWORK Redefined Education--bis245homework.com
BIS 245 HOMEWORK Redefined Education--bis245homework.comagathachristie241
 
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxjenkinsmandie
 
Sql server 2012 tutorials writing transact-sql statements
Sql server 2012 tutorials   writing transact-sql statementsSql server 2012 tutorials   writing transact-sql statements
Sql server 2012 tutorials writing transact-sql statementsSteve Xu
 
Database Application for La Salle
Database Application for La SalleDatabase Application for La Salle
Database Application for La SalleJimmy Chu
 
It203 class slides-unit5
It203 class slides-unit5It203 class slides-unit5
It203 class slides-unit5Matthew Moldvan
 
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxCharles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxchristinemaritza
 
SQL Interview Questions - InterviewBit.pdf
SQL Interview Questions - InterviewBit.pdfSQL Interview Questions - InterviewBit.pdf
SQL Interview Questions - InterviewBit.pdfAniket223719
 
Based on the materials for this week, create your own unique Datab.docx
Based on the materials for this week, create your own unique Datab.docxBased on the materials for this week, create your own unique Datab.docx
Based on the materials for this week, create your own unique Datab.docxJASS44
 
It 610 colorado university, RELATIONAL DATABASE MANAGEMENT SYSTEMS IT610 DQ1 ...
It 610 colorado university, RELATIONAL DATABASE MANAGEMENT SYSTEMS IT610 DQ1 ...It 610 colorado university, RELATIONAL DATABASE MANAGEMENT SYSTEMS IT610 DQ1 ...
It 610 colorado university, RELATIONAL DATABASE MANAGEMENT SYSTEMS IT610 DQ1 ...Willy James
 
CIS 336 STUDY Introduction Education--cis336study.com
CIS 336 STUDY Introduction Education--cis336study.comCIS 336 STUDY Introduction Education--cis336study.com
CIS 336 STUDY Introduction Education--cis336study.comclaric262
 
MySQL New Features -- Sunshine PHP 2020 Presentation
MySQL New Features -- Sunshine PHP 2020 PresentationMySQL New Features -- Sunshine PHP 2020 Presentation
MySQL New Features -- Sunshine PHP 2020 PresentationDave Stokes
 
Database Akjljljlkjlkjkljlkjldiministration.pptx
Database Akjljljlkjlkjkljlkjldiministration.pptxDatabase Akjljljlkjlkjkljlkjldiministration.pptx
Database Akjljljlkjlkjkljlkjldiministration.pptxEliasPetros
 

Similar to EDW PK Violation Troubleshooting Made Easy (20)

BIS 245 OUTLET Introduction Education--bis245outlet.com
BIS 245 OUTLET Introduction Education--bis245outlet.comBIS 245 OUTLET Introduction Education--bis245outlet.com
BIS 245 OUTLET Introduction Education--bis245outlet.com
 
BIS 245 Lessons in Excellence / bis245.com
BIS 245 Lessons in Excellence / bis245.comBIS 245 Lessons in Excellence / bis245.com
BIS 245 Lessons in Excellence / bis245.com
 
BIS 245 Redefined Education--bis245.com
BIS 245 Redefined Education--bis245.comBIS 245 Redefined Education--bis245.com
BIS 245 Redefined Education--bis245.com
 
BIS 245 HOMEWORK Introduction Education--bis245homework.com
BIS 245 HOMEWORK Introduction Education--bis245homework.comBIS 245 HOMEWORK Introduction Education--bis245homework.com
BIS 245 HOMEWORK Introduction Education--bis245homework.com
 
BIS 245 HOMEWORK Lessons in Excellence--bis245homework.com
BIS 245 HOMEWORK Lessons in Excellence--bis245homework.comBIS 245 HOMEWORK Lessons in Excellence--bis245homework.com
BIS 245 HOMEWORK Lessons in Excellence--bis245homework.com
 
BIS 245 HOMEWORK Become Exceptional--bis245homework.com
BIS 245 HOMEWORK Become Exceptional--bis245homework.comBIS 245 HOMEWORK Become Exceptional--bis245homework.com
BIS 245 HOMEWORK Become Exceptional--bis245homework.com
 
BIS 245 HOMEWORK Redefined Education--bis245homework.com
BIS 245 HOMEWORK Redefined Education--bis245homework.comBIS 245 HOMEWORK Redefined Education--bis245homework.com
BIS 245 HOMEWORK Redefined Education--bis245homework.com
 
SQL Workshop
SQL WorkshopSQL Workshop
SQL Workshop
 
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
 
Sql server 2012 tutorials writing transact-sql statements
Sql server 2012 tutorials   writing transact-sql statementsSql server 2012 tutorials   writing transact-sql statements
Sql server 2012 tutorials writing transact-sql statements
 
Database Application for La Salle
Database Application for La SalleDatabase Application for La Salle
Database Application for La Salle
 
It203 class slides-unit5
It203 class slides-unit5It203 class slides-unit5
It203 class slides-unit5
 
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxCharles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
 
SQL Interview Questions - InterviewBit.pdf
SQL Interview Questions - InterviewBit.pdfSQL Interview Questions - InterviewBit.pdf
SQL Interview Questions - InterviewBit.pdf
 
Based on the materials for this week, create your own unique Datab.docx
Based on the materials for this week, create your own unique Datab.docxBased on the materials for this week, create your own unique Datab.docx
Based on the materials for this week, create your own unique Datab.docx
 
It 610 colorado university, RELATIONAL DATABASE MANAGEMENT SYSTEMS IT610 DQ1 ...
It 610 colorado university, RELATIONAL DATABASE MANAGEMENT SYSTEMS IT610 DQ1 ...It 610 colorado university, RELATIONAL DATABASE MANAGEMENT SYSTEMS IT610 DQ1 ...
It 610 colorado university, RELATIONAL DATABASE MANAGEMENT SYSTEMS IT610 DQ1 ...
 
CIS 336 STUDY Introduction Education--cis336study.com
CIS 336 STUDY Introduction Education--cis336study.comCIS 336 STUDY Introduction Education--cis336study.com
CIS 336 STUDY Introduction Education--cis336study.com
 
MySQL New Features -- Sunshine PHP 2020 Presentation
MySQL New Features -- Sunshine PHP 2020 PresentationMySQL New Features -- Sunshine PHP 2020 Presentation
MySQL New Features -- Sunshine PHP 2020 Presentation
 
Automating SolidWorks with Excel
Automating SolidWorks with ExcelAutomating SolidWorks with Excel
Automating SolidWorks with Excel
 
Database Akjljljlkjlkjkljlkjldiministration.pptx
Database Akjljljlkjlkjkljlkjldiministration.pptxDatabase Akjljljlkjlkjkljlkjldiministration.pptx
Database Akjljljlkjlkjkljlkjldiministration.pptx
 

Recently uploaded

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

EDW PK Violation Troubleshooting Made Easy

  • 1. EDW Star Schema PK Violation Troubleshooting Made Easy Bryan L. Mack BI Developer/Team Lead Colorado Community College System
  • 2. What’s the problem? In Ellucian’s EDW – error records are written off to a WKE_* table when they can’t be inserted to the WTT_*_WKEYS table due to a primary key error. How do we find these troublesome records’ ODS data that is causing the PK violation?
  • 4. The Hard Way 1) Find the constraint in the WKEYS table
  • 5. The Hard Way 2) Find the fields in the PK
  • 6. The Hard Way 3) Find the dimension tables associated with each PK element. Use common sense to do this, if you have none of that, use deductive reasoning. MULTI_SOURCE_KEY = WDT_MULTI_SOURCE PERSON_UID = WDT_PERSON ACADEMIC_TIME_KEY = WDT_ACADEMIC_TIME
  • 7. The Hard Way 4) Build a SQL query using joins on the keys from the WKE table & each of your dimensions
  • 8. The Hard Way 5) Use logic to replace (*) in your query from step 4 with the fields you want to see. WDT_MULTI_SOURCE = multi_source WDT_ACADEMIC_TIME = academic_period WDT_INSTRUCTOR = instructor_name Etc.
  • 9. Developing The Easy Way That was way too much work. We all love reusable code, right? Good – let’s write some
  • 10. Developing the Easy Way 1) Create table with the relevant fields you want to see from each dimension should a PK error occur. Sure, this will take you an hour or so and is tedious; View it as an investment.
  • 11. Developing the Easy Way 2) Write a function to do everything else for you.
  • 12. Developing the Easy Way Find the key columns & proper dimensions
  • 13. Developing the Easy Way Build your custom SQL block Create your custom SELECT SQL statement
  • 14. Developing the Easy Way Build your custom SQL block
  • 15. Developing the Easy Way Building your custom SQL block
  • 16. Using the Easy Way 1) Call your function with your WKE_* table name as the sole input:
  • 17. Using the Easy Way The function creates your SQL for you
  • 18. Using the Easy Way 2) Run that SQL