Before you begin
Before you begin, you'll need
- IBM Account
- Tableau Online Account (Tableau has different account for their different products, example Tableau Public, Tableau Desktop, etc. Make sure the account for Tableau Online is the one you have)
and the following connection information:
- Name of the server that hosts the database you want to connect to and port number
- Database name
- User name and password
Go to IBM dashboard under Service credentials, select New credential.
If a credential is already created, just select the View credentials.
- Host name , which is a unique name or label assigned to any device that is connected to a specific computer network.
- Port Number , which is the database port
- Database Name , which is the database name
- User ID , which is the username you'll use to connect
- Password is the password you'll use to connect
- Version of dashDB
Make the connection and set up the data source
1. Start Tableau and under Connect, select IBM DB2. For a complete list of data connections, select More under To a Server. Then do the following:
- Enter the name of the server that hosts the database and the name of the database that you want to connect to.
- Enter your user name and password.If Tableau can't make the connection, verify that your credentials are correct. If you still can't connect, your computer is having trouble locating the server. Contact your network administrator or database administrator.
- (Optional) Select Initial SQL to specify a SQL command to run at the beginning of every connection, such as when you open the workbook, refresh an extract, sign in to Tableau Server, or publish to Tableau Server.
- Select Sign In
2. On the data source page, do the following:
- (Optional) Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau. For example, use a data source naming convention that helps other users of the data source figure out which data source to connect to.
- From the Schema drop-down list, select a schema or use the text box to search for a schema by name.
- Under Table, select a table or use the text box to search for a table by name.
- Drag a table to the canvas, and then select the sheet tab to start your analysis.
Do the necessary visualization then proceed.
Publishing to Tableau Server
- Under Server, select Sign In. (Important: Use the Tableau Online Account)
- Once logged in go under Server, and select the Start Tableau Bridge Client. Wait for a pop-up to appear.
- Change the Mode to Service if Application is selected.
- Follow the Go to Tableau Online and login (Use the same account as before if is not automatically logged in).
- Under Settings, select the Yes, allow Tableau Bridge to maintain live connections to on-premises data and Supports live connections.
- Go back to Tableau. Under Server, select Publish Workbook. A pop-up will appear. Under Data Sources, click Edit.
- Select the Publish Type to published separately.
- And Select the Maintain connection to a live data source.
- After a successful connection, a browser will appear and a pop-up in the browser will be displayed.
- Just click Done.
Embedding to a WebPage
- Under Workbooks, select the workbook that you created.
- Under Views, select the Sheet.
- There's a Share button in the right corner just copy the embed code. It will look like the following:
<div class='tableauPlaceholder' style='width: 1280px; height: 604px;'> <object class='tableauViz' width='1280' height='604' style='display:none;'> <param name='host_url' value='https%3A%2F%2Fdub01.online.tableau.com%2F' /> <param name='embed_code_version' value='3' /> <param name='site_root' value='/t/sourshadow1' /> <param name='name' value='Book1/Sheet1' /> <param name='tabs' value='no' /> <param name='toolbar' value='yes' /> <param name='showAppBanner' value='false' /> <param name='filter' value='iframeSizedToWindow=true' /> </object> </div>
- If you look at the embedded visualization, there's a 'footer ' containing a share button, tableau logo, etc. To hide the 'footer' set the value of toolbar to 'no'.
<param name='toolbar' value='no' />
- Now if there's an update in the database it will not update the embedded visualization. Unless you go to the Tableau Online Dashboard and refresh the database connection. Another solution is to add a parameter refresh.
<param name='refresh' value='yes' />
Now everytime the browser is 'refresh' the visualization will load the latest data in the database.
References:
0 comments:
Post a Comment