Edit the Dataset
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: Develop > Data Models > ATPTennisData
atp_players Table
- Open the atp_players Table.
- Click on + Add next to Columns. Concatenate the first (Fname) and last name (Lname) columns to create a PlayerName column after the Lname specification:
- 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:
- The Datasource contains the birthdate as an integer in the format yyyymmdd. Add a Birth_Date column to transform the data to type datetime:
- Add an Age column to calculate the age using Birth_Date and CURRENT_DATE:
- Click Save.
atp_rankings_current Table
- Open the atp_rankings_current Table.
- Add a RankRange custom column to describe Ranking:
- Click Save.
player_stats Table
- Open the player_stats Table.
- Click on column ht and rename it to Height:
- 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.
- Click on + Add > Add data model to add datasets.
- Name the dataset as ATPTennisData.
-
Add tables by clicking on + Add.
-
Create the joins between the tables and define the join condition by clicking on Venn diagram icon:
- Click Save.
- Click Validate.
- Click Deploy.
- Enter a Deploy Message:
There are two informational reports available from the 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.
IN THIS PAGE