CareerBuilder Tableau Day 11-18-2014

advertisement
CareerBuilder Tableau Day
Brian Montgomery
Tableau Software
Topics
•
•
•
•
•
•
Connecting to BigQuery
API to manager server, admin functions, etc
Embedding Tableau into SFDC
Using API as a data source
Parameters to filter across data sources
Export into Excel
Google BigQuery
• Standard connection available via Desktop
• Can’t be used for nested data http://kb.tableausoftware.com/articles/knowl
edgebase/bigquery-error-nested-data
• Solution is to hide the nested fields or write
custom SQL using the FLATTEN and WITHIN
functions
API’s for Tableau Server
•
•
•
•
Rest API
Tabcmd/Tabadmin
TDE API
Javascript (JS) API
Rest API
• Gives you simple access to the functionality
behind the data sources, projects, workbooks,
site users, and sites on a Tableau server
• Server 8.2 or later
• Must be enabled
• Fully documented in online server admin guide
(http://onlinehelp.tableausoftware.com/current/
server/enus/help.htm#rest_api.htm%3FTocPath%3DREST%
2520API%7C_____0)
Rest API Operations
• Admin
–
–
–
–
–
–
–
• Site
• Workbook
Sign In
Sign Out
Query Datasource
Query Datasources
Query View with a Preview Image
Query Views for Workbook
Query Workbook Preview Image •
– Create Site
– Update Site
– Query Sites
• Project
– Create Project
– Delete Project
– Update Project
–
–
–
–
–
Add Tags to Workbook
Delete Tag from Workbook
Query Workbook
Add Workbook to Favorites
Delete Workbook from Favorites
User
–
–
–
–
Add User to Site
Get Users on Site
Remove User from Site
Query Workbooks for User
Tabcmd
• Command line utility installed with Server.
Helps automate common tasks such as
publishing workbooks in batches and
administering users and groups.
• Can be installed on a different machine
Tabcmd Commands
• Admin
–
–
–
–
–
–
Login
Logout
Version
Set setting
Runschedule
Refreshextracts
• User
–
–
–
–
–
–
–
Addusers
Creategroup
Createusers
Deletegroup
Deleteusers
Removeusers
Syncgroup
• Project
– Createproject
– Deleteproject
• Site
–
–
–
–
–
Createsite
Createsiteusers
Deletesite
Editsite
Listsites
• Workbook
– Delete workbook-name or
datasource
– Export
– Get URL
– Publish filename
Tabadmin
• Command line utility installed on server,
allows you to perform administrative tasks
and change configuration settings. Only runs
on Server.
Tabadmin Commands
•
•
•
•
•
•
•
•
•
•
•
•
•
Activate
Administrator
Assetkeys
Autostart
Backup
Cleanup
Customize
Dbpass
Exportsite
Failoverprimary
Importsite
Importsite_verified
Licenses
•
•
•
•
•
•
•
•
•
•
•
Passwd
Restart
Restore
Set
Sitestate
Start
Status
Stop
Validate
Warmup
Ziplogs
TDE API
•
•
•
•
•
Programmatically create .tde’s.
Use C/C++/Java/Python
Create TDE’s outside of Desktop
Grab data from way more data sources
Manipulate the data however you want
TDE vs ETL
• TDE is the L in ETL
• Provides functionality to :
– Create table, insert rows
– Create a new .tde
– (L)oad the created table in the .tde
Why use TDE API?
• Use TDE API to Extract from:
• CSV’s, SQL Server, etc.
• Datasources that we have no native connection to and there
isn’t even an ODBC connector.
• EG: MongoDB, GoogleApps
• Data that isn’t even in a datasource, like data from the web.
• Multiple datasources into one .tde
The Purpose of the JavaScript API
– Being able to control a viz from the outside allows you to control vizzes in any way you
can think of, not just the built in ways.
– Examples:
• Whitewashing, Building Portals/Web Apps (likely the #1 use)
(file:///C:/Users/mkovner/Documents/Scripts%20and%20Html/JSAPI%20Demo%20-%20StockApp/WebRoot/index.html)
•
•
•
•
Embedding in visually impressive ways
Integrating in interesting ways
Combining with JavaScript libraries
The possibilities are endless…
(file:///C:/Users/mkovner/Documents/TITETG/TITETG%20-%20beta80%20version.html)
(file://filesrv01/Public/mkovner/TITETG/TITETG.html)
– And by the way, for people who do
know how to code, the API is pretty
easy to use.
JS API
Dynamic
JavaScript
Website
Embedded Tableau
Visualization
JS API
Dynamic
JavaScript
Website
Tableau JS
API
Embedded Tableau
Visualization
Two Way Communication
With the Embedded Viz
• Controlling the Viz
–
–
–
–
–
–
–
–
–
Filtering
Sizing
Switching Tabs
Refreshing/Reverting
Custom Views
Comments
Selecting Marks
Changing Parameter Selections
Hide toolbar, tabs
• Getting Info from the Viz
– Getting the fields
– Getting a value, it’s aggregation,
etc.
– Getting data from selected marks
– Get the user name, custom
views, filtering information,
comments, etc.
JS API - Caveats
–
–
–
–
You need a portal (You can’t affect the built-in portal)
You need to understand JavaScript
You don’t get write-access
No new chart types – You can only manipulate the view in
ways you previously could
– Documentation -
Tableau and SFDC
• Demo
API as Data Source
• Odata
• 9.0
• Connect to SQLServer, query Table Value
Functions (TVF) that invoke CLR (.NET) code
that calls Odata
Parameters Across Data Sources
• Demo
Export to Excel
• Demo
Download