Part 3 - Writing Data

This part of our tutorial will guide you through the process of writing data from Keboola Connection. You have learned to manipulate data in Keboola Connection 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 Keboola Connection 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 three options how to load the opportunity_denorm table into Tableau:

  • Writing data to a provisioned Snowflake/Redshift database
  • Generating a Tableau Data Extract (TDE) and loading it manually into Tableau Desktop
  • Generating a TDE and loading it into Tableau Server, either manually or automatically

In either case, you need a writer component from the Components – Writers menu.

Screenshot - Writers

In this tutorial, we’ll go with the first option – configuring the Snowflake writer as it is the easiest and fastest to use. The description of the Tableau TDE writer is part of the writers documentation. Click Add New Writer, find the Snowflake writer and click it.

Screenshot - Snowflake Writer

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 New Configuration.

Screenshot - Snowflake Writer

Name the configuration and click Create Configuration.

Screenshot - Create Snowflake Writer Configuration

At this moment, you’re probably wondering why we are using the Snowflake database and where and how you are going to get credentials to it. The answer is near – click the Set up credentials button:

Screenshot - Snowflake Configuration Intro

As part of the Keboola Connection platform we offer a dedicated database workspace that you can use to connect external tools. Simply click on Keboola Snowflake Database:

Screenshot - Snowflake Credentials

You will obtain a dedicated database and credentials to it. Use the lock icon to display the password if you wish. Go back to the Snowflake writer configuration.

Screenshot - Snowflake Credentials

The next step is to add tables – click the Add Table button.

Screenshot - Select table

Select the table out.c-opportunity.opportunity_denorm and click Add Table:

Screenshot - Select table

In the next step, you can specify properties of the columns in the target database, like Name and Data Type. Use the preview column to peek at the column data. Most columns in the opportunity_denorm table are strings (characters). Start with Set All Columns to: and select string to set them quickly. Then Preview the content of each column and set its type accordingly. For the purpose of this tutorial, it is enough to set the Amount column to the type number. Don’t forget to Save the settings.

Screenshot - Snowflake Edit Columns

When done, go back to the configuration and click on Run Component to write the data to the provisioned database.

Screenshot - Snowflake Run Configuration

Connecting with Tableau

Now that you have prepared the data source, you can connect to it from Tableau. Login to Tableau online and Create Workbook:

Screenshot - Tableau Intro

A connection to a datasource will be requested. Choose Connectors and Snowflake:

Screenshot - Tableau Connectors

Enter the credentials from the Snowflake writer configuration (you can always review them by clicking on the Database Credentials button in the right menu).

Screenshot - Tableau Credentials

Select Warehouse, Database and Schema – there is only one option because the database is completely isolated and created just for the purpose of your writer configuration. If in doubt, however, you can always check the database credentials in the Snowflake writer configuration. You will see the opportunity_denorm table.

Screenshot - Tableau Database

You can now work with the data in Tableau. You can also check that the amount column was converted to numeric.

Screenshot - Tableau Table

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

Screenshot - Tableau Report

Semi-final Note

This concludes the main steps of the Keboola Connection 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