Edit the Dataset

CONTENTS

Home

The Dataset brings in the raw data from the datasource. You generally want to edit the Dataset and tailor your data for the visualizations. The dialect in this example is MySQL to match the type of the Datasource. This tutorial modifies the tables and Dataset:

  • atp_players Table
  • atp_rankings_current Table
  • player_stats Table
  • ATPTennisData Dataset

Start from the ATPTennisData Project. Select: Projects Develop > Data Models > ATPTennisData

atp_players Table

  1. Open the atp_players Table.
    Table
  2. Click on + Add next to Columns. Concatenate the first (Fname) and last name (Lname) columns to create a PlayerName column after the Lname specification:
    Concat column names
  3. The PlayType column pulls R and L from the Datasource to indicate right and left-handed players. This is pretty obscure. Add a PlayTypeDescription column to help users interpret the data:
    Concat column names
  4. The Datasource contains the birthdate as an integer in the format yyyymmdd. Add a Birth_Date column to transform the data to type datetime:
    String to date
  5. Add an Age column to calculate the age using Birth_Date and CURRENT_DATE:
    Operators for calculations
  6. Click Save.

atp_rankings_current Table

  1. Open the atp_rankings_current Table.
    atp_rankings_current Table
  2. Add a RankRange custom column to describe Ranking:
    RankRange custom column
  3. Click Save.

player_stats Table

  1. Open the player_stats Table.
  2. Click on column ht and rename it to Height:
    ht to Height
  3. Click Save.

ATPTennisData Dataset

The table names are already included in the dataset file when we add tables. We will now define the joins between the tables so that information may be retrieved from multiple tables when viewing data.

  1. Click on + Add > Add data model to add datasets.

Add data model

  1. Name the dataset as ATPTennisData.

visual-dataset

  1. Add tables by clicking on + Add.

  2. Create the joins between the tables and define the join condition by clicking on Venn diagram icon:

JOIN tables

  1. Click Save.
  2. Click Validate.
  3. Click Deploy.
  4. Enter a Deploy Message:
    Commit Message

There are two informational reports available from the drop down menu drop down menu by Deploy:

  • Revert to a previous version: opens a list with links to previous versions and their Deploy message.
  • View Datamodel: displays the data model.

Congratulations! You have successfully deployed the data model. You are now all set to Create the Visualizations.

If you’d like to further enhance your data models with Derived Tables or Parameters, you can go to Enhance the Dataset section.