Get started with Tableau
Get started with Tableau
This is for:
DeveloperTableau can connect to Google BigQuery by:
-
Connecting Tableau to the BigQuery data source
-
Joining BigQuery tables together to create the data structure you require
Note
This tutorial details examples of how to connect the Live Tap Analytics model. You can also connect directly to the real-time events data. |
Obtaining BigQuery drivers
Many BI and Data Integration tools, for example Tableau, Domo, Informatica PowerCenter, Microsoft Excel, and Microstrategy, support connecting to Google BigQuery as a data source through native drivers third-party ODBC/OData drivers.
Be aware that the concept of data extracts seen in Tableau may not be practical when working with the high volume of data in Live Tap. If you’re working with extracts, we recommend only importing the columns and time ranges of data you require to limit extract size. Alternatively connect directly to BigQuery. |
Joining tables via keys
When you connect a BI tool such as Tableau to Live Tap, you will typically need to set up joins between tables, before you can create reports that include measures and dimension attributes from more than one view.
The join conditions for the Live Tap Analytics Model are detailed below:
-
view.view_id = product.view_id
-
view.view_id = segment.view_id
-
view.view_id = experience.view_id
-
view.session_id = session.session_id
-
view.entrance_id = entrance.entrance_id
-
view.view_id = transaction.view_id
-
view.view_id = visitor_pulse.view_id
-
view.view_id = goal_achieved.view_id
-
view.view_id = user_action.view_id
Connecting Tableau to Live Tap as a data source
Connecting Steps
Step 1
Open Tableau Desktop and navigate to the Data Source
tab in the bottom-left corner of the page.
From the blue Connect panel on the left, select Google BigQuery.
If you cannot find it, try More…
Step 2
Use your Google credentials to log in to Google BigQuery
When connected, in the Billing Project
combo box, select your project from the list.
If you do not see your project listed, contact Coveo Support to get access.
Step 3
From the Dataset combo box, select the dataset that contains the tables/views you are going to query. The list of available tables and views will be displayed:
Joining these sources together
To join these table sources together for a particular report, for example to analyze customer transactions together with the segments they were members of at the time, follow these steps:
Step 1
Select and then drag onto the Drag tables here
canvas, the tables you would like to join together, in this example the transaction and segment business views
Step 2
When prompted to select the join columns, select View Id from both table sources, and select Left as the join type, as shown in the screenshot below:
For a full list of business view-to-business view join column please refer to Joining Business Views within a BI Tool Data Source Definition.
If you would like to introduce another view, for example session, to be able to filter by geolocation, just drag it to the canvas and define a new join, as shown below:
Step 3
After defining all necessary joins, change your connection to Extract in the upper-right corner of the Tableau window, then select File > Save As. Save your workbook using a .twbx extension
Step 4
Select Go to Worksheet to open a dialog box with information about the Tableau extract being created. Once the extract has been created, you’ll see all tables in the Data panel of the Tableau window
An important consideration when joining tables in Tableau is that joins between them might result in duplicated values. An example, is joining transaction data with segment data, where a customer can be a member of multiple segments when conducting a transaction, for example:
context_id | context_viewNumber | segmentName | transaction_id | transaction_total |
---|---|---|---|---|
123xyz |
14 |
UK Desktop |
tr4 |
700$ |
123xyz |
14 |
VIP Customers |
tr4 |
700$ |
123xyz |
14 |
Returning Visitors |
tr4 |
700$ |
123xyz |
14 |
Frequent purchasers |
tr4 |
700$ |
In this example, visitor 123xyz had a single transaction worth 700$ but was a member of 4 segments when this transaction took place. This is a common situation, and one that would result in four rows being returned and an incorrect, double-counting result from the usual Sum aggregation, when the segment and transaction business views are joined together.
You need to use Tableau’s Level of Detail
expression to create the Transaction Total for this report.
Creating a calculated field without double-couting
To create a calculated field aggregating the transaction total without double-counting the transaction value due to the visitor belonging to four segments at the time of the transaction, follow these steps:
Step 1
Ctrl-select in the Measures pane on the left side of Tableau window, and select Create Calculated Field…
Step 2
Define the calculated field as MIN (transaction_total) for each transaction_id, and then SUM this value, using the expression:
SUM( { FIXED [Transaction Id] : MIN([Transaction Total]) } )
Step 3
Do the same for any other measures that experience double-counting in this way. For more details, see the Tableau documentation covering level of detail expressions