SlideShare a Scribd company logo
1 of 20
Download to read offline
SAS/Tableau Integration
10 Steps for a Seamless SAS/Tableau
Experience

Patrick Spedding
Strategic Advisor, Business Intelligence & Analytics
See-Change Solutions Ltd
patrick@see-change.com.au
US: (949) 528-6665
Australia: (02) 8005-6148
au.linkedin.com/in/spedding

Copyright @ 2012 See-Change Solutions

@spedding

http://www. see-change.com.au
10 Steps for a Seamless SAS/Tableau Experience
For the many organizations who have both SAS and Tableau, it makes sense to find ways to
integrate these technologies to provide an Integrated Information Framework which
leverages the strengths of both solutions.
This presentation covers 10 techniques for integrating SAS and Tableau, using SAS as a data
source and data preparation environment. SAS routines developed to feed the Tableau
solution will also be demonstrated.
Taking advantage of SAS and Tableau capabilities in this manner can provide a way to ‘rapid
prototype’ business reporting requirements, without the costs and delays typically seen
when attempting to model emerging business requirements in the Data Warehouse via
traditional ETL methods. In addition, this approach suggests a way to protect existing
investments in analytical reporting as developed by your SAS team, by providing a platform
to publish those reports for easy consumption, plus easy re-formatting and ‘slice & dice’ of
these reports in the Tableau environment.
Techniques covered will include commonly requested topics such as data and currency
formatting, relative date calculations, longitudinal data analysis, integrating SAS Web Stored
Processes and considerations for the use of SAS ACCESS and SAS ODBC/ OLE-DB.
Copyright @ 2012 See-Change Solutions
Agenda
• SAS/Tableau Integration:
1.
2.
3.
4.
5.

Extract formats
Integrating SAS Web Stored Processes
Use of SAS ODBC/OLE-DB
Date Formats
Extract useful elements of date fields/relative date
calculations
6. Currency Formats
7. Rename Column Names/columns used for levels in
hierarchies
8. Add descriptors for coded fields
9. Use SAS formats for more complex formats
10.Merge Disparate Data Sources

• Q&A
Copyright @ 2012 See-Change Solutions
SAS Data as a Source for Tableau:
Approaches
•
•
•
•
•
•

SAS Dataset -> CSV -> Tableau
SAS Report -> CSV -> Tableau
SAS Stored Process -> Tableau
SAS Data -> Datasource (RDBMS Connection) -> Tableau
SAS Data -> Datasource (via ODBC) -> Tableau
SAS Dataset -> OLE-DB -> Excel -> Tableau
Note: CSV is typically around 10X smaller than SAS7BDAT format

Copyright @ 2012 See-Change Solutions
SAS Dataset -> CSV -> Tableau
This method uses a SAS dataset to feed the Tableau environment. For
example, complex business logic can be built into a SAS (E. Guide) process,
then value can be added in Tableau Desktop (e.g. drill-downs, relative time
calculations, ratios), before displaying via Tableau Server). This is a good
approach for both prototyping BI requirements as well as ‘Analytical Data
Preparation’.

proc export
data=WORK.COMPARATIVE_PERFORMANCE
outfile=
"corpdfsSASOutputComparative
_Performance.txt"
dbms=dlm replace ;
delimiter = '|' ;
run ;

Copyright @ 2012 See-Change Solutions
SAS Report -> CSV -> Tableau
This method takes the output of a SAS report (eg Enterprise Guide report)
and ‘pivots’ the data in such a way as to provide a data input into Tableau.

Copyright @ 2012 See-Change Solutions
SAS Stored Process -> Tableau
This method takes a SAS report and enables it as a SAS Web Stored Process,
which can then be linked and run within Tableau. Security can be integrated
via ‘Single Signon’ if required. (Note: SAS Integration Technologies required)

http://<SAS Server>:8080/SASStoredProcess/do?_program=<Report
Name>&_action=properties

Note: For SAS Web Stored Processes with Prompts, need to add
&_action=properties to the URL
Copyright @ 2012 See-Change Solutions
SAS Data -> RDBMS-> Tableau
This method uses the SAS ‘PROC SQL’ method to output SAS results directly to
a relational table, for example a table within the Data Warehouse. With the
SAS/ACCESS interface, you reference database objects directly in a DATA step
or SAS procedure using the SAS LIBNAME statement. PROC SQL can be used
to update, delete or insert data into a relational table, for example via Bulk
Load.

Copyright @ 2012 See-Change Solutions
SAS Data -> ODBC -> Tableau
This method can use an ODBC Connection to allow any SAS dataset to be a
source for Tableau. The SAS ODBC driver can be used to create an ODBC
connection, from which a data source connection can be defined within
Tableau to point to the SAS data set.
http://support.sas.com/demosdownloads/setupcat.jsp?cat=ODBC%20Drivers

Note: SAS profile required to access product downloads

Note: Date fields are not properly interpreted unless it is a Tableau extract
Copyright @ 2012 See-Change Solutions

(400Mb download)
SAS Data -> OLE-DB -> Excel -> Tableau
This method can use an OLE-DB Connection to allow any SAS dataset to be a
source for Tableau. The SAS OLE-DB provider can be used to create an OLEDB, from which a data source connection can be defined within Excel. Tableau
can then point to the Excel file to retrieve the SAS data.

Copyright @ 2012 See-Change Solutions
Dealing with SAS Dates
In this example, we have a number of dates in our SAS dataset:

t1.rsmwrkdt FORMAT=DDMMYYS8. LABEL="Resumed Work Date"

AS 'Resumed Work Date'n

PROC SQL;
CREATE TABLE WORK.QUERY_FOR_POLICY1 AS
SELECT t1.trandate FORMAT=DDMMYYS8.,
t1.polexpdt FORMAT=DDMMYYS8.,
t1.commdate FORMAT=DDMMYYS8.
FROM WORK.QUERY_FOR_POLICY t1
QUIT;

Copyright @ 2012 See-Change Solutions
Dealing with SAS Dates - Notes
If you're going to work with a date as a string type it's better to use ISO-8601 format of
YYYY-MM-DD. This is locale insensitive so you don't need to worry about
DD/MM/YYYY vs. MM/DD/YYYY. Your formula would then read:
DATE(LEFT([Period],4)
+ “-“ + MID([Period],5,2)
+ “-“ + RIGHT([Period],2))
This is an improvement, but string logic is much slower than numeric logic, so it would
be even better to work with this as numbers. Convert the [Period] field to be a number
instead of a string, then use the following:

DATEADD(‘DAY’, [YYYYMMDD]%100-1,
DATEADD(‘MONTH’, INT(([YYYYMMDD]%10000)/100)-1,
DATEADD(‘YEAR’, INT([YYYYMMDD]/10000)-1900, #1900-01-01#)))
Note that the performance gains can be remarkable with large data sets. In a test
conducted over a 1 billion record sample, the first calculation took over 4 hours to
complete, while the second took about a minute.

Copyright @ 2012 See-Change Solutions
Dealing with SAS Dates - Examples
/* Day of Injury */
(CASE
WHEN(WEEKDAY(t1.injdate)) = 1 THEN
'Sun'
WHEN(WEEKDAY(t1.injdate)) = 2 THEN
'Mon'
WHEN(WEEKDAY(t1.injdate)) = 3 THEN
'Tue'
WHEN(WEEKDAY(t1.injdate)) = 4 THEN
'Wed'
WHEN(WEEKDAY(t1.injdate)) = 5 THEN
'Thu'
WHEN(WEEKDAY(t1.injdate)) = 6 THEN
'Fri'
WHEN(WEEKDAY(t1.injdate)) = 7 THEN
'Sat'
END) AS 'Day of Injury'n,

Copyright @ 2012 See-Change Solutions
Dealing with SAS Dates - Examples
/* Elapsed Weeks */
intnx('week',t1.csdwrkdt,t1.rsmwrkdt,'e')
LABEL="Elapsed Weeks" AS 'Elapsed Weeks'n,
/* Claim Age (Months) */
intck('month',t1.clamdate,t1.sysdate) LABEL="Claim
Age (Months)" AS 'Claim Age (Months)'n,
/* Reporting Delay (days) */
intck('day',t1.injdate,t1.clamdate) ) AS 'Reporting
Delay (days)'n,

SAS Lag functions can also be
very useful
(See “Longitudinal Data
Techniques”
http://www.ats.ucla.edu/stat/sas
/library/nesug00/ad1002.pdf)

Copyright @ 2012 See-Change Solutions
Currency Formats
t1.totpayc FORMAT=BEST12. LABEL="Claim Payments to
Date" AS 'Claim Payments to Date'n

Use BEST12. to avoid
issues when
importing/displaying SAS
currency data in Tableau.

Copyright @ 2012 See-Change Solutions
Rename Column Names
Rename cryptic SAS field names:
data claims ;
set mth.claims ;
keep insurer claim teed deis injdate injdsnat
injnatc injresc injdislc clmclosf clmclodt
workpc csdwrkdt rsmwrkdt hrswrkwk hrstincc;

run ;
t1.emplnam1 LABEL="Employer Name" AS
'Employer Name'n,

Label hierarchy levels appropriately:
/* Industry - Level 1*/
t1.indgroup LABEL="Industry - Level 1"
/* Industry - Level 2*/
t1.indsubgrp LABEL="Industry - Level 2"
Copyright @ 2012 See-Change Solutions
Add descriptors for coded SAS fields
/* Insurer Name */
(CASE
WHEN t1.insurer =
WHEN t1.insurer =
WHEN t1.insurer =
WHEN t1.insurer =
ELSE 'Not Known'
END) AS 'Insurer Name'n

1
2
3
4

THEN
THEN
THEN
THEN

'Insurer
'Insurer
'Insurer
'Insurer

1'
2'
3'
4'

/* Liability Status */
(CASE
WHEN t1.clmliab = 1 THEN 'Notification of work related
injury'
WHEN t1.clmliab = 2 THEN 'Liability accepted'
WHEN t1.clmliab = 5 THEN 'Liability not yet determined'
WHEN t1.clmliab = 6 THEN 'Administration error'
WHEN t1.clmliab = 7 THEN 'Liability denied'
WHEN t1.clmliab = 8 THEN 'Provisional liability accepted weekly and medical payments'
WHEN t1.clmliab = 9 THEN 'Reasonable excuse'
WHEN t1.clmliab = 10 THEN 'Provisional liability
discontinued'
WHEN t1.clmliab = 11 THEN 'Provisional liability accepted medical only, weekly payments not applicable'
WHEN t1.clmliab = 12 THEN 'No action after notification'
ELSE 'Not Known'
END) AS 'Liability Status'n,
Copyright @ 2012 See-Change Solutions
Use SAS formats for more complex formats
CASE WHEN t1.deis le '30jun2011'd
THEN put(t1.occncode,asc21dgn.)
ELSE put(t1.occncode,anzsco1n.)
END AS 'Occupation - Level 1'n,
/* Occupation - Level 2*/
CASE WHEN t1.deis le '30jun2011'd
THEN put(t1.occncode,asc22dgn.)
ELSE put(t1.occncode,anzsco2n.)
END AS 'Occupation - Level 2'n,

Often in SAS, a single field will be set up with several informats, relating
to different levels of a hierarchy.
Connecting to the SAS dataset via SAS ODBC would lose this
information, therefore it is advisable to apply each SAS informat to
create multiple fields in the SAS extract, prior to importing into Tableau.
Copyright @ 2012 See-Change Solutions
Merge Disparate Data Sources
This is particularly
useful when rows may
not all match across
sources

Also, this approach avoids having to try to join
all sources in real time in one or several outer
join SQL statements (as would be the approach
in traditional BI tools such as Cognos)

Copyright @ 2012 See-Change Solutions
THANK YOU.

See-Change Solutions
patrick@see-change.com.au

au.linkedin.com/in/spedding
@spedding

www.see-change.com.au
Copyright @ 2012 See-Change Solutions

More Related Content

What's hot

PowerPivot and PowerQuery
PowerPivot and PowerQueryPowerPivot and PowerQuery
PowerPivot and PowerQueryin4400
 
Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...
Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...
Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...Edureka!
 
Power BI Interview Questions and Answers | Power BI Certification | Power BI ...
Power BI Interview Questions and Answers | Power BI Certification | Power BI ...Power BI Interview Questions and Answers | Power BI Certification | Power BI ...
Power BI Interview Questions and Answers | Power BI Certification | Power BI ...Edureka!
 
Microsoft power bi
Microsoft power biMicrosoft power bi
Microsoft power bitechpro360
 
1- Introduction of Azure data factory.pptx
1- Introduction of Azure data factory.pptx1- Introduction of Azure data factory.pptx
1- Introduction of Azure data factory.pptxBRIJESH KUMAR
 
Microsoft Azure Data Factory Data Flow Scenarios
Microsoft Azure Data Factory Data Flow ScenariosMicrosoft Azure Data Factory Data Flow Scenarios
Microsoft Azure Data Factory Data Flow ScenariosMark Kromer
 
Splunk 7.0の概要及び新機能
Splunk 7.0の概要及び新機能Splunk 7.0の概要及び新機能
Splunk 7.0の概要及び新機能Kunihiko Ikeyama
 
BigData Architecture for Azure
BigData Architecture for AzureBigData Architecture for Azure
BigData Architecture for AzureRyoma Nagata
 
How to create a tableau waterfall chart
How to create a tableau waterfall chartHow to create a tableau waterfall chart
How to create a tableau waterfall chartBen Jones
 
Azure Data Factory Introduction.pdf
Azure Data Factory Introduction.pdfAzure Data Factory Introduction.pdf
Azure Data Factory Introduction.pdfMaheshPandit16
 
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...Neo4j
 
データ分析基盤、どう作る?システム設計のポイント、教えます - Developers.IO 2019 (20191101)
データ分析基盤、どう作る?システム設計のポイント、教えます - Developers.IO 2019 (20191101)データ分析基盤、どう作る?システム設計のポイント、教えます - Developers.IO 2019 (20191101)
データ分析基盤、どう作る?システム設計のポイント、教えます - Developers.IO 2019 (20191101)Yosuke Katsuki
 

What's hot (20)

PowerPivot and PowerQuery
PowerPivot and PowerQueryPowerPivot and PowerQuery
PowerPivot and PowerQuery
 
ETL Process
ETL ProcessETL Process
ETL Process
 
Client Copy
Client CopyClient Copy
Client Copy
 
Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...
Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...
Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...
 
Power BI Interview Questions and Answers | Power BI Certification | Power BI ...
Power BI Interview Questions and Answers | Power BI Certification | Power BI ...Power BI Interview Questions and Answers | Power BI Certification | Power BI ...
Power BI Interview Questions and Answers | Power BI Certification | Power BI ...
 
Power query
Power queryPower query
Power query
 
Power BI visuals
Power BI visualsPower BI visuals
Power BI visuals
 
Kettle – Etl Tool
Kettle – Etl ToolKettle – Etl Tool
Kettle – Etl Tool
 
Microsoft power bi
Microsoft power biMicrosoft power bi
Microsoft power bi
 
1- Introduction of Azure data factory.pptx
1- Introduction of Azure data factory.pptx1- Introduction of Azure data factory.pptx
1- Introduction of Azure data factory.pptx
 
Power BI - Power Query
Power BI - Power QueryPower BI - Power Query
Power BI - Power Query
 
Microsoft Azure Data Factory Data Flow Scenarios
Microsoft Azure Data Factory Data Flow ScenariosMicrosoft Azure Data Factory Data Flow Scenarios
Microsoft Azure Data Factory Data Flow Scenarios
 
Splunk 7.0の概要及び新機能
Splunk 7.0の概要及び新機能Splunk 7.0の概要及び新機能
Splunk 7.0の概要及び新機能
 
Big Data analytics best practices
Big Data analytics best practicesBig Data analytics best practices
Big Data analytics best practices
 
BigData Architecture for Azure
BigData Architecture for AzureBigData Architecture for Azure
BigData Architecture for Azure
 
How to create a tableau waterfall chart
How to create a tableau waterfall chartHow to create a tableau waterfall chart
How to create a tableau waterfall chart
 
Azure Data Factory Introduction.pdf
Azure Data Factory Introduction.pdfAzure Data Factory Introduction.pdf
Azure Data Factory Introduction.pdf
 
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
 
Power bi overview
Power bi overview Power bi overview
Power bi overview
 
データ分析基盤、どう作る?システム設計のポイント、教えます - Developers.IO 2019 (20191101)
データ分析基盤、どう作る?システム設計のポイント、教えます - Developers.IO 2019 (20191101)データ分析基盤、どう作る?システム設計のポイント、教えます - Developers.IO 2019 (20191101)
データ分析基盤、どう作る?システム設計のポイント、教えます - Developers.IO 2019 (20191101)
 

Viewers also liked

07. Analytics & Reporting Requirements Template
07. Analytics & Reporting Requirements Template07. Analytics & Reporting Requirements Template
07. Analytics & Reporting Requirements TemplateAlan D. Duncan
 
Real-time SQL Access for Your Salesforce.com Data
Real-time SQL Access for Your Salesforce.com DataReal-time SQL Access for Your Salesforce.com Data
Real-time SQL Access for Your Salesforce.com DataSalesforce Developers
 
ForecastCombinations package
ForecastCombinations packageForecastCombinations package
ForecastCombinations packageeraviv
 
Case Study: Visualizing Complex Data in Tableau
Case Study: Visualizing Complex Data in TableauCase Study: Visualizing Complex Data in Tableau
Case Study: Visualizing Complex Data in TableauSenturus
 
Capturing Business Requirements For Scorecards, Dashboards And Reports
Capturing Business Requirements For Scorecards, Dashboards And ReportsCapturing Business Requirements For Scorecards, Dashboards And Reports
Capturing Business Requirements For Scorecards, Dashboards And ReportsJulian Rains
 
Gathering And Documenting Your Bi Business Requirements
Gathering And Documenting Your Bi Business RequirementsGathering And Documenting Your Bi Business Requirements
Gathering And Documenting Your Bi Business RequirementsWynyard Group
 
Amazon S3を中心とするデータ分析のベストプラクティス
Amazon S3を中心とするデータ分析のベストプラクティスAmazon S3を中心とするデータ分析のベストプラクティス
Amazon S3を中心とするデータ分析のベストプラクティスAmazon Web Services Japan
 
500’s Demo Day Batch 16 >> Podozi
500’s Demo Day Batch 16 >>  Podozi500’s Demo Day Batch 16 >>  Podozi
500’s Demo Day Batch 16 >> Podozi500 Startups
 

Viewers also liked (8)

07. Analytics & Reporting Requirements Template
07. Analytics & Reporting Requirements Template07. Analytics & Reporting Requirements Template
07. Analytics & Reporting Requirements Template
 
Real-time SQL Access for Your Salesforce.com Data
Real-time SQL Access for Your Salesforce.com DataReal-time SQL Access for Your Salesforce.com Data
Real-time SQL Access for Your Salesforce.com Data
 
ForecastCombinations package
ForecastCombinations packageForecastCombinations package
ForecastCombinations package
 
Case Study: Visualizing Complex Data in Tableau
Case Study: Visualizing Complex Data in TableauCase Study: Visualizing Complex Data in Tableau
Case Study: Visualizing Complex Data in Tableau
 
Capturing Business Requirements For Scorecards, Dashboards And Reports
Capturing Business Requirements For Scorecards, Dashboards And ReportsCapturing Business Requirements For Scorecards, Dashboards And Reports
Capturing Business Requirements For Scorecards, Dashboards And Reports
 
Gathering And Documenting Your Bi Business Requirements
Gathering And Documenting Your Bi Business RequirementsGathering And Documenting Your Bi Business Requirements
Gathering And Documenting Your Bi Business Requirements
 
Amazon S3を中心とするデータ分析のベストプラクティス
Amazon S3を中心とするデータ分析のベストプラクティスAmazon S3を中心とするデータ分析のベストプラクティス
Amazon S3を中心とするデータ分析のベストプラクティス
 
500’s Demo Day Batch 16 >> Podozi
500’s Demo Day Batch 16 >>  Podozi500’s Demo Day Batch 16 >>  Podozi
500’s Demo Day Batch 16 >> Podozi
 

Similar to SAS/Tableau integration

Data ware house design
Data ware house designData ware house design
Data ware house designSayed Ahmed
 
Data ware house design
Data ware house designData ware house design
Data ware house designSayed Ahmed
 
SAS/Cognos Integration Approaches
SAS/Cognos Integration ApproachesSAS/Cognos Integration Approaches
SAS/Cognos Integration ApproachesPatrick Spedding
 
Delta machenism with db connect
Delta machenism with db connectDelta machenism with db connect
Delta machenism with db connectObaid shaikh
 
Nitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence PortfolioNitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence Portfolionpatel2362
 
Prog1 chap1 and chap 2
Prog1 chap1 and chap 2Prog1 chap1 and chap 2
Prog1 chap1 and chap 2rowensCap
 
Snowflake Notes_Part_2.docx
Snowflake Notes_Part_2.docxSnowflake Notes_Part_2.docx
Snowflake Notes_Part_2.docxNabumaKhala1
 
Learn SAS Programming
Learn SAS ProgrammingLearn SAS Programming
Learn SAS ProgrammingSASTechies
 
Business Intelligence Project Portfolio
Business Intelligence Project PortfolioBusiness Intelligence Project Portfolio
Business Intelligence Project Portfoliodmrasek
 
Dan Querimit - BI Portfolio
Dan Querimit - BI PortfolioDan Querimit - BI Portfolio
Dan Querimit - BI Portfolioquerimit
 
Project Portfolio
Project PortfolioProject Portfolio
Project PortfolioArthur Chan
 
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...Edureka!
 
SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...
SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...
SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...Edureka!
 
SQL Server - Introduction to TSQL
SQL Server - Introduction to TSQLSQL Server - Introduction to TSQL
SQL Server - Introduction to TSQLPeter Gfader
 
Top 140+ Advanced SAS Interview Questions and Answers.pdf
Top 140+ Advanced SAS Interview Questions and Answers.pdfTop 140+ Advanced SAS Interview Questions and Answers.pdf
Top 140+ Advanced SAS Interview Questions and Answers.pdfDatacademy.ai
 
Business Intelligence Portfolio of Anastasia Bakhareva
Business Intelligence Portfolio of Anastasia BakharevaBusiness Intelligence Portfolio of Anastasia Bakhareva
Business Intelligence Portfolio of Anastasia Bakharevabanastal
 
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...Jean Ihm
 
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...djkucera
 

Similar to SAS/Tableau integration (20)

Data ware house design
Data ware house designData ware house design
Data ware house design
 
Data ware house design
Data ware house designData ware house design
Data ware house design
 
SAS/Cognos Integration Approaches
SAS/Cognos Integration ApproachesSAS/Cognos Integration Approaches
SAS/Cognos Integration Approaches
 
Delta machenism with db connect
Delta machenism with db connectDelta machenism with db connect
Delta machenism with db connect
 
Nitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence PortfolioNitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence Portfolio
 
Prog1 chap1 and chap 2
Prog1 chap1 and chap 2Prog1 chap1 and chap 2
Prog1 chap1 and chap 2
 
Snowflake Notes_Part_2.docx
Snowflake Notes_Part_2.docxSnowflake Notes_Part_2.docx
Snowflake Notes_Part_2.docx
 
Learn SAS Programming
Learn SAS ProgrammingLearn SAS Programming
Learn SAS Programming
 
Business Intelligence Project Portfolio
Business Intelligence Project PortfolioBusiness Intelligence Project Portfolio
Business Intelligence Project Portfolio
 
Sas training in hyderabad
Sas training in hyderabadSas training in hyderabad
Sas training in hyderabad
 
Dan Querimit - BI Portfolio
Dan Querimit - BI PortfolioDan Querimit - BI Portfolio
Dan Querimit - BI Portfolio
 
Project Portfolio
Project PortfolioProject Portfolio
Project Portfolio
 
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
 
SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...
SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...
SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...
 
SQL Server - Introduction to TSQL
SQL Server - Introduction to TSQLSQL Server - Introduction to TSQL
SQL Server - Introduction to TSQL
 
Top 140+ Advanced SAS Interview Questions and Answers.pdf
Top 140+ Advanced SAS Interview Questions and Answers.pdfTop 140+ Advanced SAS Interview Questions and Answers.pdf
Top 140+ Advanced SAS Interview Questions and Answers.pdf
 
Business Intelligence Portfolio of Anastasia Bakhareva
Business Intelligence Portfolio of Anastasia BakharevaBusiness Intelligence Portfolio of Anastasia Bakhareva
Business Intelligence Portfolio of Anastasia Bakhareva
 
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
 
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
 
SAS - Training
SAS - Training SAS - Training
SAS - Training
 

More from Patrick Spedding

Smart Cities Week Australia 2019 - Case Study: Idaho National Laboratory
Smart Cities Week Australia 2019 - Case Study: Idaho National LaboratorySmart Cities Week Australia 2019 - Case Study: Idaho National Laboratory
Smart Cities Week Australia 2019 - Case Study: Idaho National LaboratoryPatrick Spedding
 
AlohaCloud for Smart Cities
AlohaCloud for Smart CitiesAlohaCloud for Smart Cities
AlohaCloud for Smart CitiesPatrick Spedding
 
A/NZ BI Survey Results 2011-12
A/NZ BI Survey Results   2011-12A/NZ BI Survey Results   2011-12
A/NZ BI Survey Results 2011-12Patrick Spedding
 
Visualization, Mobility and Analytical Reporting
Visualization, Mobility and Analytical ReportingVisualization, Mobility and Analytical Reporting
Visualization, Mobility and Analytical ReportingPatrick Spedding
 

More from Patrick Spedding (6)

Smart Cities Week Australia 2019 - Case Study: Idaho National Laboratory
Smart Cities Week Australia 2019 - Case Study: Idaho National LaboratorySmart Cities Week Australia 2019 - Case Study: Idaho National Laboratory
Smart Cities Week Australia 2019 - Case Study: Idaho National Laboratory
 
AlohaCloud for Smart Cities
AlohaCloud for Smart CitiesAlohaCloud for Smart Cities
AlohaCloud for Smart Cities
 
Vision2015-CBS-1148-Final
Vision2015-CBS-1148-FinalVision2015-CBS-1148-Final
Vision2015-CBS-1148-Final
 
1011
10111011
1011
 
A/NZ BI Survey Results 2011-12
A/NZ BI Survey Results   2011-12A/NZ BI Survey Results   2011-12
A/NZ BI Survey Results 2011-12
 
Visualization, Mobility and Analytical Reporting
Visualization, Mobility and Analytical ReportingVisualization, Mobility and Analytical Reporting
Visualization, Mobility and Analytical Reporting
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

SAS/Tableau integration

  • 1. SAS/Tableau Integration 10 Steps for a Seamless SAS/Tableau Experience Patrick Spedding Strategic Advisor, Business Intelligence & Analytics See-Change Solutions Ltd patrick@see-change.com.au US: (949) 528-6665 Australia: (02) 8005-6148 au.linkedin.com/in/spedding Copyright @ 2012 See-Change Solutions @spedding http://www. see-change.com.au
  • 2. 10 Steps for a Seamless SAS/Tableau Experience For the many organizations who have both SAS and Tableau, it makes sense to find ways to integrate these technologies to provide an Integrated Information Framework which leverages the strengths of both solutions. This presentation covers 10 techniques for integrating SAS and Tableau, using SAS as a data source and data preparation environment. SAS routines developed to feed the Tableau solution will also be demonstrated. Taking advantage of SAS and Tableau capabilities in this manner can provide a way to ‘rapid prototype’ business reporting requirements, without the costs and delays typically seen when attempting to model emerging business requirements in the Data Warehouse via traditional ETL methods. In addition, this approach suggests a way to protect existing investments in analytical reporting as developed by your SAS team, by providing a platform to publish those reports for easy consumption, plus easy re-formatting and ‘slice & dice’ of these reports in the Tableau environment. Techniques covered will include commonly requested topics such as data and currency formatting, relative date calculations, longitudinal data analysis, integrating SAS Web Stored Processes and considerations for the use of SAS ACCESS and SAS ODBC/ OLE-DB. Copyright @ 2012 See-Change Solutions
  • 3. Agenda • SAS/Tableau Integration: 1. 2. 3. 4. 5. Extract formats Integrating SAS Web Stored Processes Use of SAS ODBC/OLE-DB Date Formats Extract useful elements of date fields/relative date calculations 6. Currency Formats 7. Rename Column Names/columns used for levels in hierarchies 8. Add descriptors for coded fields 9. Use SAS formats for more complex formats 10.Merge Disparate Data Sources • Q&A Copyright @ 2012 See-Change Solutions
  • 4. SAS Data as a Source for Tableau: Approaches • • • • • • SAS Dataset -> CSV -> Tableau SAS Report -> CSV -> Tableau SAS Stored Process -> Tableau SAS Data -> Datasource (RDBMS Connection) -> Tableau SAS Data -> Datasource (via ODBC) -> Tableau SAS Dataset -> OLE-DB -> Excel -> Tableau Note: CSV is typically around 10X smaller than SAS7BDAT format Copyright @ 2012 See-Change Solutions
  • 5. SAS Dataset -> CSV -> Tableau This method uses a SAS dataset to feed the Tableau environment. For example, complex business logic can be built into a SAS (E. Guide) process, then value can be added in Tableau Desktop (e.g. drill-downs, relative time calculations, ratios), before displaying via Tableau Server). This is a good approach for both prototyping BI requirements as well as ‘Analytical Data Preparation’. proc export data=WORK.COMPARATIVE_PERFORMANCE outfile= "corpdfsSASOutputComparative _Performance.txt" dbms=dlm replace ; delimiter = '|' ; run ; Copyright @ 2012 See-Change Solutions
  • 6. SAS Report -> CSV -> Tableau This method takes the output of a SAS report (eg Enterprise Guide report) and ‘pivots’ the data in such a way as to provide a data input into Tableau. Copyright @ 2012 See-Change Solutions
  • 7. SAS Stored Process -> Tableau This method takes a SAS report and enables it as a SAS Web Stored Process, which can then be linked and run within Tableau. Security can be integrated via ‘Single Signon’ if required. (Note: SAS Integration Technologies required) http://<SAS Server>:8080/SASStoredProcess/do?_program=<Report Name>&_action=properties Note: For SAS Web Stored Processes with Prompts, need to add &_action=properties to the URL Copyright @ 2012 See-Change Solutions
  • 8. SAS Data -> RDBMS-> Tableau This method uses the SAS ‘PROC SQL’ method to output SAS results directly to a relational table, for example a table within the Data Warehouse. With the SAS/ACCESS interface, you reference database objects directly in a DATA step or SAS procedure using the SAS LIBNAME statement. PROC SQL can be used to update, delete or insert data into a relational table, for example via Bulk Load. Copyright @ 2012 See-Change Solutions
  • 9. SAS Data -> ODBC -> Tableau This method can use an ODBC Connection to allow any SAS dataset to be a source for Tableau. The SAS ODBC driver can be used to create an ODBC connection, from which a data source connection can be defined within Tableau to point to the SAS data set. http://support.sas.com/demosdownloads/setupcat.jsp?cat=ODBC%20Drivers Note: SAS profile required to access product downloads Note: Date fields are not properly interpreted unless it is a Tableau extract Copyright @ 2012 See-Change Solutions (400Mb download)
  • 10. SAS Data -> OLE-DB -> Excel -> Tableau This method can use an OLE-DB Connection to allow any SAS dataset to be a source for Tableau. The SAS OLE-DB provider can be used to create an OLEDB, from which a data source connection can be defined within Excel. Tableau can then point to the Excel file to retrieve the SAS data. Copyright @ 2012 See-Change Solutions
  • 11. Dealing with SAS Dates In this example, we have a number of dates in our SAS dataset: t1.rsmwrkdt FORMAT=DDMMYYS8. LABEL="Resumed Work Date" AS 'Resumed Work Date'n PROC SQL; CREATE TABLE WORK.QUERY_FOR_POLICY1 AS SELECT t1.trandate FORMAT=DDMMYYS8., t1.polexpdt FORMAT=DDMMYYS8., t1.commdate FORMAT=DDMMYYS8. FROM WORK.QUERY_FOR_POLICY t1 QUIT; Copyright @ 2012 See-Change Solutions
  • 12. Dealing with SAS Dates - Notes If you're going to work with a date as a string type it's better to use ISO-8601 format of YYYY-MM-DD. This is locale insensitive so you don't need to worry about DD/MM/YYYY vs. MM/DD/YYYY. Your formula would then read: DATE(LEFT([Period],4) + “-“ + MID([Period],5,2) + “-“ + RIGHT([Period],2)) This is an improvement, but string logic is much slower than numeric logic, so it would be even better to work with this as numbers. Convert the [Period] field to be a number instead of a string, then use the following: DATEADD(‘DAY’, [YYYYMMDD]%100-1, DATEADD(‘MONTH’, INT(([YYYYMMDD]%10000)/100)-1, DATEADD(‘YEAR’, INT([YYYYMMDD]/10000)-1900, #1900-01-01#))) Note that the performance gains can be remarkable with large data sets. In a test conducted over a 1 billion record sample, the first calculation took over 4 hours to complete, while the second took about a minute. Copyright @ 2012 See-Change Solutions
  • 13. Dealing with SAS Dates - Examples /* Day of Injury */ (CASE WHEN(WEEKDAY(t1.injdate)) = 1 THEN 'Sun' WHEN(WEEKDAY(t1.injdate)) = 2 THEN 'Mon' WHEN(WEEKDAY(t1.injdate)) = 3 THEN 'Tue' WHEN(WEEKDAY(t1.injdate)) = 4 THEN 'Wed' WHEN(WEEKDAY(t1.injdate)) = 5 THEN 'Thu' WHEN(WEEKDAY(t1.injdate)) = 6 THEN 'Fri' WHEN(WEEKDAY(t1.injdate)) = 7 THEN 'Sat' END) AS 'Day of Injury'n, Copyright @ 2012 See-Change Solutions
  • 14. Dealing with SAS Dates - Examples /* Elapsed Weeks */ intnx('week',t1.csdwrkdt,t1.rsmwrkdt,'e') LABEL="Elapsed Weeks" AS 'Elapsed Weeks'n, /* Claim Age (Months) */ intck('month',t1.clamdate,t1.sysdate) LABEL="Claim Age (Months)" AS 'Claim Age (Months)'n, /* Reporting Delay (days) */ intck('day',t1.injdate,t1.clamdate) ) AS 'Reporting Delay (days)'n, SAS Lag functions can also be very useful (See “Longitudinal Data Techniques” http://www.ats.ucla.edu/stat/sas /library/nesug00/ad1002.pdf) Copyright @ 2012 See-Change Solutions
  • 15. Currency Formats t1.totpayc FORMAT=BEST12. LABEL="Claim Payments to Date" AS 'Claim Payments to Date'n Use BEST12. to avoid issues when importing/displaying SAS currency data in Tableau. Copyright @ 2012 See-Change Solutions
  • 16. Rename Column Names Rename cryptic SAS field names: data claims ; set mth.claims ; keep insurer claim teed deis injdate injdsnat injnatc injresc injdislc clmclosf clmclodt workpc csdwrkdt rsmwrkdt hrswrkwk hrstincc; run ; t1.emplnam1 LABEL="Employer Name" AS 'Employer Name'n, Label hierarchy levels appropriately: /* Industry - Level 1*/ t1.indgroup LABEL="Industry - Level 1" /* Industry - Level 2*/ t1.indsubgrp LABEL="Industry - Level 2" Copyright @ 2012 See-Change Solutions
  • 17. Add descriptors for coded SAS fields /* Insurer Name */ (CASE WHEN t1.insurer = WHEN t1.insurer = WHEN t1.insurer = WHEN t1.insurer = ELSE 'Not Known' END) AS 'Insurer Name'n 1 2 3 4 THEN THEN THEN THEN 'Insurer 'Insurer 'Insurer 'Insurer 1' 2' 3' 4' /* Liability Status */ (CASE WHEN t1.clmliab = 1 THEN 'Notification of work related injury' WHEN t1.clmliab = 2 THEN 'Liability accepted' WHEN t1.clmliab = 5 THEN 'Liability not yet determined' WHEN t1.clmliab = 6 THEN 'Administration error' WHEN t1.clmliab = 7 THEN 'Liability denied' WHEN t1.clmliab = 8 THEN 'Provisional liability accepted weekly and medical payments' WHEN t1.clmliab = 9 THEN 'Reasonable excuse' WHEN t1.clmliab = 10 THEN 'Provisional liability discontinued' WHEN t1.clmliab = 11 THEN 'Provisional liability accepted medical only, weekly payments not applicable' WHEN t1.clmliab = 12 THEN 'No action after notification' ELSE 'Not Known' END) AS 'Liability Status'n, Copyright @ 2012 See-Change Solutions
  • 18. Use SAS formats for more complex formats CASE WHEN t1.deis le '30jun2011'd THEN put(t1.occncode,asc21dgn.) ELSE put(t1.occncode,anzsco1n.) END AS 'Occupation - Level 1'n, /* Occupation - Level 2*/ CASE WHEN t1.deis le '30jun2011'd THEN put(t1.occncode,asc22dgn.) ELSE put(t1.occncode,anzsco2n.) END AS 'Occupation - Level 2'n, Often in SAS, a single field will be set up with several informats, relating to different levels of a hierarchy. Connecting to the SAS dataset via SAS ODBC would lose this information, therefore it is advisable to apply each SAS informat to create multiple fields in the SAS extract, prior to importing into Tableau. Copyright @ 2012 See-Change Solutions
  • 19. Merge Disparate Data Sources This is particularly useful when rows may not all match across sources Also, this approach avoids having to try to join all sources in real time in one or several outer join SQL statements (as would be the approach in traditional BI tools such as Cognos) Copyright @ 2012 See-Change Solutions