Part 3 - Writing Data

This part of our tutorial will guide you through the process of writing data from KBC. You have learned to manipulate data in KBC using SQL, and have a denormalized table called opportunity_denorm ready in the out.c-tutorial storage bucket. This table is suitable to be loaded into Tableau Analytics.

Getting Started

Before you proceed, have Tableau Desktop installed. If you want to try connection to Tableau Server, have credentials for that server as well. As an alternative, sign up for a free trial of Tableau Online to test it out.

Writing data from KBC into a business intelligence and analytics tool such as Tableau is very common. Writing data to GoodData BI is covered in the following side step. However, keep in mind you can use the processed data in any way you wish.

There are two options how to load the opportunity_denorm table into Tableau:

  • Generating a Tableau Data Extract (TDE) and loading it manually into Tableau Desktop, or
  • Generating a TDE and loading it into Tableau Server, either manually or automatically.

In both cases, you need the Tableau writer in the Writers section of KBC.

Screenshot - Writers

Each writer can have multiple configurations. Each configuration represents a combination of data and destination. To give an example, you only need a single configuration to write multiple tables into a single Tableau server. However, two configurations are needed when you want to write data to two servers, or have a set of data loaded manually and a different set automatically. Continue with Create New Configuration.

Screenshot - Tableau Writer

Name and Create the configuration.

Screenshot - Create Tableau Writer Configuration

Add the tables you want to send to Tableau,

Screenshot - Start configuration

in our case, select the out.c-tutorial.opportunity_denorm table,

Screenshot - Select table

and specify a data type for each of its columns. The data types represent the type of values stored in the columns. If you IGNORE a column, it won’t be loaded into Tableau at all.

Since most columns in the opportunity_denorm table are strings (characters), start with Set All Types to: and select string to set them quickly. Then Preview the content of each column and set its type accordingly.

Screenshot - Table configuration

If you are not sure how to set up the data types, consult the following screenshots:

Screenshot - Table configuration - Column types Part 1

Screenshot - Table configuration - Column types Part 2

Save the configuration.

Loading Data into Tableau Desktop

Click on Export tables to TDE to export the data set, a single table so far, into a TDE file.

Screenshot - Tableau Writer - TDE

The TDE file will be generated by a background job. When a job is running, a small orange circle appears under Last runs, along with RunId and other info on the job. Green is for success, red for failure. Click on the indicator, or the info next to it for more details.

Download the latest version of the Tableau Data Export to your local computer by clicking on the out.c_tutorial.opportunity_denorm.tde link. Then load it into Tableau Desktop.

Screenshot - Tableau Desktop Load

The data table gets loaded.

Screenshot - Tableau Desktop Loaded Data

Create reports to your liking. For instance, use the precomputed opportunity probability class.

Screenshot - Tableau Desktop Sample Chart

Loading Data into Tableau Server

For multiple users and for automated processing, it is better to load your data into Tableau Server. It can be done with your own server instance, as well as with the Tableau Online server. To connect to Tableau Server, Setup Upload:

Screenshot - Tableau Setup Upload

Set a new destination,

Screenshot - Tableau Set Destination

then select Tableau Server,

Screenshot - Tableau Use Server

and set server credentials.

Screenshot - Tableau Set Credentials

If connecting to your own Tableau instance, have the connection properties at the ready, or ask your server administrator. If connecting to Tableau Online, find all the necessary information in the intro page URL:

Screenshot - Tableau Server Credentials

From the above Tableau Online page, extract the Server URLhttps://10ay.online.tableau.com/, and the Siteodinovo. Use an existing Tableau project, or create a new one.

Screenshot - Tableau Use Server

After setting up the credentials, click on Enable instant upload. The TDE files are automatically pushed to Tableau Server every time they are generated.

Screenshot - Tableau Set Instant Upload

Then go back to the Write to Server configuration and click on Export Tables to TDE one more time.

Screenshot - Tableau Load Data to Server

Again, a background job will be created, taking the out.c-tutorial.opportunity_denorm table from Storage, converting it to a TDE file, and loading that file to your server. If the job finishes successfully, you will see a new data source added to the project:

Screenshot - Tableau Online DataSource

You, and everyone else in your organization, can then use that data source from Tableau Desktop by connecting to your server.

Screenshot - Tableau Desktop Connect to Server

See your data source here:

Screenshot - Tableau Desktop Datasource

Create charts and reports as usual, and publish them to other people.

Semi-final Note

This concludes the main steps of the KBC tutorial. You have learned to load data into Storage, manipulate it using Transformations, and load it into the target system using Writers.

At this point, you can