Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson...

57

Transcript of Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson...

Page 1: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.
Page 2: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Welcome

Page 3: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Embedding Tableau for self-service data science

Blair Hutchinson

Senior Product Consultant

Tableau

# T C 1 8

Santiago Sanchez

Solutions Consultant

Tableau

Page 4: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Data Scientist: The Sexiest Job of the 21st Century

Harvard Business Review

Page 5: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Santiago SanchezSolutions Consultant

Page 6: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Blair HutchinsonSenior Product Consultant

Page 7: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Agenda

1. Current Paradigm

2. A Solution

3. Implementation

4. Q&A

Page 8: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

The Problem

Page 9: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

UsersData Scientists

Tableau Desktop

Page 10: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Tableau’s External Services Connection

Page 11: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

But what if…

• Adapting your code proves to be difficult/impossible

• Output of the model needs to be persisted

• Time to execute model is above an acceptable threshold

• Model requires different input/output than what a Tableau visualization

can send

Page 12: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

A Solution!

Page 13: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Web Portal

Tableau Server

UsersData Scientists

Page 14: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.
Page 15: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

How do we get there?

Page 16: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Your Options

Build it

Data Scientist(s)

Tableau Server Admin

Web Developer(s)

Buy it

Tableau Partners

Page 17: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Building Components

Web Server

Python/R/Other

Tableau Server

Page 18: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Implementation

Page 19: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Building Components

Python/R/Other

Model 1 Model 2

Page 20: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 1

Build the Model

• Create and train your predictive model.

• Exposed relevant variables to the end user.

• Create and save your script (.py file) to a server.

Page 21: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 1 - Python Code & Data Structure

Load & filter data

Predict housing prices

Add username & timestamp columns

Export data to a database

Input variables

Page 22: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Building Components

Python/R/Other

Model 1 Model 2

Page 23: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 2

Tableau Desktop

• Connect to your output table and visualize the result

• Filter the data

• Most recent run

• Row level security

Page 24: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 2 - Tableau Workbook

Page 25: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Building Components

Python/R/Other

Tableau Server

Model 1 Model 2

Page 26: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 3

Publish the Workbook

• Create a project in Tableau Server and configure permissions

• Publish the workbook to the project in Tableau Server

Page 27: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 3 - Project PermissionsCreate a group - Set permissions - Lock to project

Page 28: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Building Components

Web Server

Python/R/Other

Tableau Server

Model 1 Model 2

Page 29: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4

Build the Web Application

1. Receive parameters from the end user to feed into model

2. Single Sign On into Tableau Server

3. Embed a Tableau Workbook on the web application

Page 30: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Building Components

Web Server

Python/R/Other

Tableau Server

Model 1 Model 2

Web Application

Page 31: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.1

Receive parameters from the end user to feed into model:

a. Create a web page with input fields

b. Make a server-side call from the web application to the model

Page 32: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.1 - Web App Receiving Parameters

Page 33: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.1 - Gather user input

Parse JSON object & create a string with all variables

Add user & time

Execute the model

Page 34: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

How do we execute the model?

1. Specify Python.exe location

2. Find the model file (.py)

3. Pass user variables

Page 35: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.1 - Run the model

Setup python.exe location

Specify model file and variables

Configure command line to open in the background

Execute the model and return the results (if any…)

Page 36: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Building Components

Web Server

Python/R/Other

Tableau Server

Model 1 Model 2

Web Application

Page 37: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.2

Single Sign On into Tableau Server. Choose between:

a. Trusted Authentication

b. Windows Authentication

c. SAML

d. Others

Page 38: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.2 - Trusted Authentication

1

2

3

4

5

6

Page 39: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.2 - Trusted Authentication

Specify the username & site

Form a POST web request, include: URL, username & site

Send the request to Tableau Server

Get the ticket

Page 40: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

What does a ticket look like?

9D1ObyqDQmSIOyQpKdy4Sw==:dg62gCsSE0QRArXNTOp6mlJ5

Page 41: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Building Components

Web Server

Python/R/Other

Tableau Server

Model 1 Model 2

Web Application

JS API REST API

Page 42: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.3

Embed a Tableau Workbook on the web application

a. Use the Tableau JavaScript API to embed the workbook

b. Use the Tableau REST API to check which workbooks a user can see

Page 43: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.3 - Tableau APIs

JS API REST API

Page 44: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.3 - Tableau JavaScript API

JS APICreate viz URL

Specify <div> to render viz

Configure how to show the viz

Render the viz

Page 45: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.3 - Tableau JavaScript API

Page 46: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Tableau JavaScript API

Hey! I want to learn more…

a. Intro Video to the JavaScript API:

https://www.tableau.com/learn/tutorials/on-demand/javascript-api-intro-and-embed

b. Tableau JavaScript API Tutorial:

https://onlinehelp.tableau.com/samples/en-us/js_api/tutorial.htm

c. Tableau JavaScript API Reference:

https://onlinehelp.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_ref.htm

Page 47: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Step 4.3 - Tableau REST API

REST API

Use a pre-built library!

Page 48: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Tableau REST API

Hey! I want to learn more about this too…

a. Intro Video to the Tableau REST API:

https://www.tableau.com/learn/tutorials/on-demand/rest-api

a. Tableau REST API Reference:

https://onlinehelp.tableau.com/current/api/rest_api/en-us/help.htm

b. Tableau REST API Libraries worth checking:

- Tableau Server Client (Python): https://github.com/tableau/server-client-python

- tableau_tools (Python): https://github.com/bryantbhowell/tableau_tools

- DataPainters (.NET/JAVA): http://datapainters.com/products/tableau_rest_library.php

Page 49: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Let’s Summarize

Page 50: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

The full picture

Server

Web Server

Python/R/Other

JS API REST API

Web Application

Model 1 Model 2

Database Server

Tableau Server

1

2

3

4

5 6

7

Page 51: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

What Next?

Page 52: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Please complete the

session survey from the

Session Details screen

in your TC18 app

Page 53: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Embedding Tableau for Self-Service Data Science

S E S S I O N R E P E AT S

Thursday | 2:15PM – 3:15PM | Location

Page 54: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Advanced Analytics at Scale

R E L AT E D S E S S I O N S

Wednesday | 3:30PM – 4:30PM | New Orleans Theater C

Data Science Applications with TabPy/RWednesday | 12:00PM – 1:00PM | New Orleans Theater B

Page 55: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Questions?

Page 56: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.

Thank you!

#TC18

Page 57: Welcome [tc18.tableau.com] · Embedding Tableau for self-service data science Blair Hutchinson Senior Product Consultant Tableau #TC18 Santiago Sanchez Solutions Consultant Tableau.