SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Converting gis contours_to_cad
Converting gis contours_to_cadConverting gis contours_to_cad
Converting gis contours_to_cadbonge02
 
SSRS BI Project
SSRS BI ProjectSSRS BI Project
SSRS BI Projectpencarver
 
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-newindividual484
 
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 ExcelNavjyotsinh Jadeja
 
MIS 226: Chapter 3
MIS 226: Chapter 3MIS 226: Chapter 3
MIS 226: Chapter 3macrob14
 
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 MotorsAlexHunetr
 
Nspire--iPad App Tutorial--Scatterplots
Nspire--iPad App Tutorial--ScatterplotsNspire--iPad App Tutorial--Scatterplots
Nspire--iPad App Tutorial--ScatterplotsMedia4math
 
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...AlexHunetr
 
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.0Cathie101
 
Streamlining Enterprise-Level GIS Reporting
Streamlining Enterprise-Level GIS ReportingStreamlining Enterprise-Level GIS Reporting
Streamlining Enterprise-Level GIS ReportingSafe Software
 
Streamlining Enterprise-Level GIS Reporting
Streamlining Enterprise-Level GIS ReportingStreamlining Enterprise-Level GIS Reporting
Streamlining Enterprise-Level GIS ReportingSafe Software
 
Spring 2020 excel project #1 instructions
Spring 2020 excel project #1   instructionsSpring 2020 excel project #1   instructions
Spring 2020 excel project #1 instructionsAnetteNsah
 
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. solutionJackCandtona
 

Tendances (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
 

En vedette

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 AWSAmazon 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 ...
From weeks to hours big data analytics with tableau and amazon web services ...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 TableauDATAVERSITY
 
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 Visualizationlesterathayde
 
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 featuresVenkata Reddy Konasani
 
Tableau presentation
Tableau presentationTableau presentation
Tableau presentationkt166212
 
Tableau free tutorial
Tableau free tutorialTableau free tutorial
Tableau free tutorialtekslate1
 

En vedette (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
 

Similaire à Tableau + Redshift views for dummies

Table partitioning in PostgreSQL + Rails
Table partitioning in PostgreSQL + RailsTable partitioning in PostgreSQL + Rails
Table partitioning in PostgreSQL + RailsAgnieszka Figiel
 
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.pptxEmmanuelAzuela3
 
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...Moatasim Magdy
 
SSRS - PPS - MOSS Profile
SSRS - PPS - MOSS ProfileSSRS - PPS - MOSS Profile
SSRS - PPS - MOSS Profiletthompson0421
 
Les08 (manipulating data)
Les08 (manipulating data)Les08 (manipulating data)
Les08 (manipulating data)Achmad Solichin
 
Chris Seebacher Portfolio
Chris Seebacher PortfolioChris Seebacher Portfolio
Chris Seebacher Portfolioguest3ea163
 
Part3 Explain the Explain Plan
Part3 Explain the Explain PlanPart3 Explain the Explain Plan
Part3 Explain the Explain PlanMaria Colgan
 
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 !Jean-Marc Desvaux
 
SQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersSQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersBRIJESH KUMAR
 
Online Statistics Gathering for ETL
Online Statistics Gathering for ETLOnline Statistics Gathering for ETL
Online Statistics Gathering for ETLAndrej Pashchenko
 

Similaire à 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
 

Dernier

Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 

Dernier (20)

Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 

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