SlideShare a Scribd company logo
1 of 18
Tableau + Redshift views
for dummies
GOAL
Generate a new table with the desired data
No, no, no, no
We are not going to:
• Delete
• Insert
• Update
(for the moment…)
What we use
Redshift (PostgreSQL 8.0.2)
Tableau 8.1
Workbench / Navicat / Aginity workbench (for
previous exploration)
Selecting columns
Select A, C
FROM table;
A B C
1 ES 10
2 DE 20
3 ES 30
4 FR 40
3 ES 40
6 FR 60
A C
1 10
2 20
3 30
4 40
3 40
6 60
Selecting columns and rows
A B C
1 ES 10
2 DE 20
3 ES 30
4 FR 40
3 ES 40
6 FR 60
A C
1 10
3 30
3 40
Select A, C
WHERE B = ‘ES’
FROM table;
Transforming data
A B C
1 ES 10
2 DE 20
3 ES 30
4 FR 40
3 ES 40
6 FR 60
Select A, SUM(C) AS revenue
FROM table
GROUP BY A;
A revenue
1 10
2 20
3 70
4 40
6 60
Transforming data with operators
A B C
1 ES 10
2 DE 20
3 ES 30
4 FR 40
3 ES 40
6 FR 60
Select A, (C – C*.3) AS benefits
FROM table;
A benefits
1 7
2 14
3 21
4 28
6 28
6 42
Mathematical operators
Select A, (C – C*.3) AS benefits
FROM table;
Operator Description Example Result
+ addition 2 + 3 5
- subtraction 2 - 3 -1
* multiplication 2 * 3 6
/ division 4 / 2 2
% modulo 5 % 4 1
^ exponentiation 2.0 ^ 3.0 8
|/ square root | / 25.0 5
||/ cube root || / 27.0 3
@ absolute value @ -5.0 5
Math functions:
http://docs.aws.amazon.com/redshift/latest/dg/Math_functions.html
What seems to work better
1. Create a view in Redshift
2. Add the view to the table
3. Edit the Join if needed
4. Ready to go
Create a view in Redshift
CREATE OR REPLACE VIEW public.payingusers
SELECT
transactions.user_id, sum(transactions.amount_in_dollars)
AS revenue
FROM transactions
WHERE transactions.amount_in_dollars > 0::numeric(12,4)
GROUP BY transactions.user_id;
What seems to work better
1. Create a view in Redshift
2. Add the view to the table
3. Edit the Join if needed
4. Ready to go
Add the view to the table
• In Data select Edit Tables… and add the view
What seems to work better
1. Create a view in Redshift
2. Add the view to the table
3. Edit the Join if needed
4. Ready to go
Edit the Join if needed
• In Tables select Edit… and check the Join.
Ready to go
Links
• http://www.w3schools.com/sql/
• http://sqlzoo.net
• http://aws.amazon.com/es/documentation/redshift/
• http://www.postgresql.org/docs/8.0/interactive/index.html
• http://www.aginity.com/workbench/redshift/
• http://www.navicat.com/
Thanks !
Ivan Magrans
Product Owner
Golden Manager
@ivan_mv
ivan@mediavida.com

More Related Content

What's hot

Converting gis contours_to_cad
Converting gis contours_to_cadConverting gis contours_to_cad
Converting gis contours_to_cad
bonge02
 
SSRS BI Project
SSRS BI ProjectSSRS BI Project
SSRS BI Project
pencarver
 
MIS 226: Chapter 3
MIS 226: Chapter 3MIS 226: Chapter 3
MIS 226: Chapter 3
macrob14
 
Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0
Cathie101
 

What's hot (20)

Converting gis contours_to_cad
Converting gis contours_to_cadConverting gis contours_to_cad
Converting gis contours_to_cad
 
Lab4
Lab4Lab4
Lab4
 
SSRS BI Project
SSRS BI ProjectSSRS BI Project
SSRS BI Project
 
Excel Waterfall Chart
Excel Waterfall ChartExcel Waterfall Chart
Excel Waterfall Chart
 
Actuate BIRT - Graph
Actuate BIRT - GraphActuate BIRT - Graph
Actuate BIRT - Graph
 
How to create a report for Inside FT
How to create a report for Inside FTHow to create a report for Inside FT
How to create a report for Inside FT
 
Dervy bis-155-final-exam-guide-music-on-demand-new
Dervy bis-155-final-exam-guide-music-on-demand-newDervy bis-155-final-exam-guide-music-on-demand-new
Dervy bis-155-final-exam-guide-music-on-demand-new
 
How to make Gantt chart in Excel
How to make Gantt chart in ExcelHow to make Gantt chart in Excel
How to make Gantt chart in Excel
 
MIS 226: Chapter 3
MIS 226: Chapter 3MIS 226: Chapter 3
MIS 226: Chapter 3
 
What's new in Calc and Chart
What's new in Calc and ChartWhat's new in Calc and Chart
What's new in Calc and Chart
 
Excel 2016 | Module 3: SAM Project 1a Pick Up Motors
Excel 2016 | Module 3: SAM Project 1a Pick Up MotorsExcel 2016 | Module 3: SAM Project 1a Pick Up Motors
Excel 2016 | Module 3: SAM Project 1a Pick Up Motors
 
Nspire--iPad App Tutorial--Scatterplots
Nspire--iPad App Tutorial--ScatterplotsNspire--iPad App Tutorial--Scatterplots
Nspire--iPad App Tutorial--Scatterplots
 
Excel 2013 Chapter 8: SAM Project 1a Precision Guitars WORKING WITH PIVOTTABL...
Excel 2013 Chapter 8: SAM Project 1a Precision Guitars WORKING WITH PIVOTTABL...Excel 2013 Chapter 8: SAM Project 1a Precision Guitars WORKING WITH PIVOTTABL...
Excel 2013 Chapter 8: SAM Project 1a Precision Guitars WORKING WITH PIVOTTABL...
 
Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0
 
Sap arch
Sap archSap arch
Sap arch
 
Streamlining Enterprise-Level GIS Reporting
Streamlining Enterprise-Level GIS ReportingStreamlining Enterprise-Level GIS Reporting
Streamlining Enterprise-Level GIS Reporting
 
Streamlining Enterprise-Level GIS Reporting
Streamlining Enterprise-Level GIS ReportingStreamlining Enterprise-Level GIS Reporting
Streamlining Enterprise-Level GIS Reporting
 
Spring 2020 excel project #1 instructions
Spring 2020 excel project #1   instructionsSpring 2020 excel project #1   instructions
Spring 2020 excel project #1 instructions
 
Gantt excel
Gantt excelGantt excel
Gantt excel
 
exploring_ecap_grader_c2_Transactions_LastFirst. solution
exploring_ecap_grader_c2_Transactions_LastFirst. solutionexploring_ecap_grader_c2_Transactions_LastFirst. solution
exploring_ecap_grader_c2_Transactions_LastFirst. solution
 

Viewers also liked

Tableau presentation
Tableau presentationTableau presentation
Tableau presentation
kt166212
 

Viewers also liked (8)

Analytics on the Cloud with Tableau on AWS
Analytics on the Cloud with Tableau on AWSAnalytics on the Cloud with Tableau on AWS
Analytics on the Cloud with Tableau on AWS
 
From weeks to hours big data analytics with tableau and amazon web services ...
From weeks to hours  big data analytics with tableau and amazon web services ...From weeks to hours  big data analytics with tableau and amazon web services ...
From weeks to hours big data analytics with tableau and amazon web services ...
 
Analyzing Billions of Data Rows with Alteryx, Amazon Redshift, and Tableau
Analyzing Billions of Data Rows with Alteryx, Amazon Redshift, and TableauAnalyzing Billions of Data Rows with Alteryx, Amazon Redshift, and Tableau
Analyzing Billions of Data Rows with Alteryx, Amazon Redshift, and Tableau
 
Tableau Software - Business Analytics and Data Visualization
Tableau Software - Business Analytics and Data VisualizationTableau Software - Business Analytics and Data Visualization
Tableau Software - Business Analytics and Data Visualization
 
Learning Tableau - Data, Graphs, Filters, Dashboards and Advanced features
Learning Tableau -  Data, Graphs, Filters, Dashboards and Advanced featuresLearning Tableau -  Data, Graphs, Filters, Dashboards and Advanced features
Learning Tableau - Data, Graphs, Filters, Dashboards and Advanced features
 
Tableau presentation
Tableau presentationTableau presentation
Tableau presentation
 
Tableau Server Basics
Tableau Server BasicsTableau Server Basics
Tableau Server Basics
 
Tableau free tutorial
Tableau free tutorialTableau free tutorial
Tableau free tutorial
 

Similar to Tableau + Redshift views for dummies

V.6 CSPro Tabulation Application_Creating Tables with PostCalc Application.pptx
V.6 CSPro Tabulation Application_Creating Tables with PostCalc Application.pptxV.6 CSPro Tabulation Application_Creating Tables with PostCalc Application.pptx
V.6 CSPro Tabulation Application_Creating Tables with PostCalc Application.pptx
EmmanuelAzuela3
 

Similar to Tableau + Redshift views for dummies (20)

Les09
Les09Les09
Les09
 
Table partitioning in PostgreSQL + Rails
Table partitioning in PostgreSQL + RailsTable partitioning in PostgreSQL + Rails
Table partitioning in PostgreSQL + Rails
 
It ready dw_day4_rev00
It ready dw_day4_rev00It ready dw_day4_rev00
It ready dw_day4_rev00
 
V.6 CSPro Tabulation Application_Creating Tables with PostCalc Application.pptx
V.6 CSPro Tabulation Application_Creating Tables with PostCalc Application.pptxV.6 CSPro Tabulation Application_Creating Tables with PostCalc Application.pptx
V.6 CSPro Tabulation Application_Creating Tables with PostCalc Application.pptx
 
Less08 Schema
Less08 SchemaLess08 Schema
Less08 Schema
 
Tableau training course
Tableau training courseTableau training course
Tableau training course
 
Session 8 connect your universal application with database .. builders & deve...
Session 8 connect your universal application with database .. builders & deve...Session 8 connect your universal application with database .. builders & deve...
Session 8 connect your universal application with database .. builders & deve...
 
SSRS - PPS - MOSS Profile
SSRS - PPS - MOSS ProfileSSRS - PPS - MOSS Profile
SSRS - PPS - MOSS Profile
 
Les09 Manipulating Data
Les09 Manipulating DataLes09 Manipulating Data
Les09 Manipulating Data
 
Les08 (manipulating data)
Les08 (manipulating data)Les08 (manipulating data)
Les08 (manipulating data)
 
Dax en
Dax enDax en
Dax en
 
Les08
Les08Les08
Les08
 
Chris Seebacher Portfolio
Chris Seebacher PortfolioChris Seebacher Portfolio
Chris Seebacher Portfolio
 
Les10
Les10Les10
Les10
 
BI Step by Step
BI Step by StepBI Step by Step
BI Step by Step
 
Part3 Explain the Explain Plan
Part3 Explain the Explain PlanPart3 Explain the Explain Plan
Part3 Explain the Explain Plan
 
Getting power bi
Getting power biGetting power bi
Getting power bi
 
Web Developer make the most out of your Database !
Web Developer make the most out of your Database !Web Developer make the most out of your Database !
Web Developer make the most out of your Database !
 
SQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersSQL Database Performance Tuning for Developers
SQL Database Performance Tuning for Developers
 
Online Statistics Gathering for ETL
Online Statistics Gathering for ETLOnline Statistics Gathering for ETL
Online Statistics Gathering for ETL
 

Recently uploaded

Fuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertaintyFuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertainty
RafigAliyev2
 
一比一原版纽卡斯尔大学毕业证成绩单如何办理
一比一原版纽卡斯尔大学毕业证成绩单如何办理一比一原版纽卡斯尔大学毕业证成绩单如何办理
一比一原版纽卡斯尔大学毕业证成绩单如何办理
cyebo
 
Exploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptxExploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptx
DilipVasan
 
一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理
pyhepag
 
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
pyhepag
 
一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理
pyhepag
 
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
Amil baba
 
一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理
cyebo
 
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Valters Lauzums
 
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
pyhepag
 

Recently uploaded (20)

How I opened a fake bank account and didn't go to prison
How I opened a fake bank account and didn't go to prisonHow I opened a fake bank account and didn't go to prison
How I opened a fake bank account and didn't go to prison
 
Generative AI for Trailblazers_ Unlock the Future of AI.pdf
Generative AI for Trailblazers_ Unlock the Future of AI.pdfGenerative AI for Trailblazers_ Unlock the Future of AI.pdf
Generative AI for Trailblazers_ Unlock the Future of AI.pdf
 
Easy and simple project file on mp online
Easy and simple project file on mp onlineEasy and simple project file on mp online
Easy and simple project file on mp online
 
Fuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertaintyFuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertainty
 
一比一原版纽卡斯尔大学毕业证成绩单如何办理
一比一原版纽卡斯尔大学毕业证成绩单如何办理一比一原版纽卡斯尔大学毕业证成绩单如何办理
一比一原版纽卡斯尔大学毕业证成绩单如何办理
 
Exploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptxExploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptx
 
一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理
 
Data Visualization Exploring and Explaining with Data 1st Edition by Camm sol...
Data Visualization Exploring and Explaining with Data 1st Edition by Camm sol...Data Visualization Exploring and Explaining with Data 1st Edition by Camm sol...
Data Visualization Exploring and Explaining with Data 1st Edition by Camm sol...
 
2024 Q2 Orange County (CA) Tableau User Group Meeting
2024 Q2 Orange County (CA) Tableau User Group Meeting2024 Q2 Orange County (CA) Tableau User Group Meeting
2024 Q2 Orange County (CA) Tableau User Group Meeting
 
2024 Q1 Tableau User Group Leader Quarterly Call
2024 Q1 Tableau User Group Leader Quarterly Call2024 Q1 Tableau User Group Leader Quarterly Call
2024 Q1 Tableau User Group Leader Quarterly Call
 
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
 
一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理
 
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
 
Formulas dax para power bI de microsoft.pdf
Formulas dax para power bI de microsoft.pdfFormulas dax para power bI de microsoft.pdf
Formulas dax para power bI de microsoft.pdf
 
一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理
 
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
 
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
 
Pre-ProductionImproveddsfjgndflghtgg.pptx
Pre-ProductionImproveddsfjgndflghtgg.pptxPre-ProductionImproveddsfjgndflghtgg.pptx
Pre-ProductionImproveddsfjgndflghtgg.pptx
 
社内勉強会資料  Mamba - A new era or ephemeral
社内勉強会資料   Mamba - A new era or ephemeral社内勉強会資料   Mamba - A new era or ephemeral
社内勉強会資料  Mamba - A new era or ephemeral
 
The Significance of Transliteration Enhancing
The Significance of Transliteration EnhancingThe Significance of Transliteration Enhancing
The Significance of Transliteration Enhancing
 

Tableau + Redshift views for dummies

  • 1. Tableau + Redshift views for dummies
  • 2. GOAL Generate a new table with the desired data
  • 3. No, no, no, no We are not going to: • Delete • Insert • Update (for the moment…)
  • 4. What we use Redshift (PostgreSQL 8.0.2) Tableau 8.1 Workbench / Navicat / Aginity workbench (for previous exploration)
  • 5. Selecting columns Select A, C FROM table; A B C 1 ES 10 2 DE 20 3 ES 30 4 FR 40 3 ES 40 6 FR 60 A C 1 10 2 20 3 30 4 40 3 40 6 60
  • 6. Selecting columns and rows A B C 1 ES 10 2 DE 20 3 ES 30 4 FR 40 3 ES 40 6 FR 60 A C 1 10 3 30 3 40 Select A, C WHERE B = ‘ES’ FROM table;
  • 7. Transforming data A B C 1 ES 10 2 DE 20 3 ES 30 4 FR 40 3 ES 40 6 FR 60 Select A, SUM(C) AS revenue FROM table GROUP BY A; A revenue 1 10 2 20 3 70 4 40 6 60
  • 8. Transforming data with operators A B C 1 ES 10 2 DE 20 3 ES 30 4 FR 40 3 ES 40 6 FR 60 Select A, (C – C*.3) AS benefits FROM table; A benefits 1 7 2 14 3 21 4 28 6 28 6 42
  • 9. Mathematical operators Select A, (C – C*.3) AS benefits FROM table; Operator Description Example Result + addition 2 + 3 5 - subtraction 2 - 3 -1 * multiplication 2 * 3 6 / division 4 / 2 2 % modulo 5 % 4 1 ^ exponentiation 2.0 ^ 3.0 8 |/ square root | / 25.0 5 ||/ cube root || / 27.0 3 @ absolute value @ -5.0 5 Math functions: http://docs.aws.amazon.com/redshift/latest/dg/Math_functions.html
  • 10. What seems to work better 1. Create a view in Redshift 2. Add the view to the table 3. Edit the Join if needed 4. Ready to go
  • 11. Create a view in Redshift CREATE OR REPLACE VIEW public.payingusers SELECT transactions.user_id, sum(transactions.amount_in_dollars) AS revenue FROM transactions WHERE transactions.amount_in_dollars > 0::numeric(12,4) GROUP BY transactions.user_id;
  • 12. What seems to work better 1. Create a view in Redshift 2. Add the view to the table 3. Edit the Join if needed 4. Ready to go
  • 13. Add the view to the table • In Data select Edit Tables… and add the view
  • 14. What seems to work better 1. Create a view in Redshift 2. Add the view to the table 3. Edit the Join if needed 4. Ready to go
  • 15. Edit the Join if needed • In Tables select Edit… and check the Join.
  • 17. Links • http://www.w3schools.com/sql/ • http://sqlzoo.net • http://aws.amazon.com/es/documentation/redshift/ • http://www.postgresql.org/docs/8.0/interactive/index.html • http://www.aginity.com/workbench/redshift/ • http://www.navicat.com/
  • 18. Thanks ! Ivan Magrans Product Owner Golden Manager @ivan_mv ivan@mediavida.com