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 Projects > ATPTennisData

atp_players Table

  1. Open the atp_players Table.
    Table
  2. 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. Change column ht 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. Open the ATPTennisData Dataset. ATP dataset view
    The tables were added to the Dataset when you added them to the project.

  2. Create the joins between the tables:

    • atp_players Id column to atp_rankings_current PlayerId column
    • atp_rankings_current PlayerId column to player_stats PlayerId column
    • atp_players Id column to player_stats PlayerId column
      JOIN tables
  3. Click Save.

  4. Click Commit.

  5. Enter a Commit Message:
    Commit Message

  6. Click Commit.

Note the alert for uncommitted changes is turned off, and the Push to Production and Deploy buttons are now active.

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

  • Commit logs: displays the commit history for the project.
  • View Data Model: displays the data model.