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 analytics 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.

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.

Name and Create the configuration.

Add tables you want to send to Tableau,

select the out.c-tutorial.opportunity_denorm 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.

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

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.

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.

The data table gets loaded.

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

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:

Set a new destination,

then select Tableau Server,

and set server credentials.

If connecting to you 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:

From the above Tableau Online page, extract the Server URL – https://10ay.online.tableau.com/, and the Site – odinovo. Use an existing Tableau project, or create a new one.

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

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

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:

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

See your data source here:

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