- Getting Started
- Managing Tenants and Spaces
- Using Development Mode
- Using Datasources
- Connecting Databases
- MySQL
- Postgres
- Amazon RedShift
- Microsoft SQL Server
- BigQuery
- Snowflake
- MongoDB
- ClickHouse
- Hive
- ETable
- Impala
- Oracle
- Teradata
- Google Sheets
- Google Analytics
- Public Dataset
- Using Projects
- Using Datasets and Reports
- Using Visualizations
- Using Dashboards
Create a Parameter
CONTENTS
Home
- Overview
- Getting Started
- Managing Tenants and Spaces
- Using Development Mode
- Using Datasources
- Connecting Databases
- MySQL
- Postgres
- Amazon RedShift
- Microsoft SQL Server
- BigQuery
- Snowflake
- MongoDB
- ClickHouse
- Hive
- ETable
- Impala
- Oracle
- Teradata
- Google Sheets
- Google Analytics
- Public Dataset
- Using Projects
- Using Datasets and Reports
- Using Visualizations
- Using Dashboards
In this example, you create a RoundType parameter so the user can select which Round data to visualize for a player. The RoundName column is added to make the results more user-friendly. For example, QF is mapped to Quarter Final. The new WinsByRound column is added for efficiency, so a match is only considered if it is the same type as the selected RoundType. For example, if the user selects Quarter Final, only Quarter Final type matches are considered.
- Start from the ATPTennisData Project. Select:
Projects > ATPTennisData
- Edit the atp_players table.
- Define the parameter:
parameter RoundType
allowed_value "All"
allowed_value "Quarter Final"
allowed_value "Semi Final"
allowed_value "Final"
default_value "All"
type string
- Click Save.
- Edit the atp_matches table.
- Create a RoundName column to make the existing Round abbreviations user-friendly:
column RoundName
sql """ case when (Round = 'QF') then 'Quarter Final' else
(case when (Round = 'SF') then 'Semi Final' else
(case when (Round = 'F') then 'Final' else '' end )
end)
end """
type string
- Create a WinsByRound column to only consider round types that match the RoundType parameter:
column WinsByRound
sql """ (case when (('$RoundType' = 'Quarter Final' and Round = 'QF') or
('$RoundType' = 'Semi Final' and Round = 'SF') or
('$RoundType' = 'Final' and Round = 'F') or
('$RoundType' = 'All'))
then 1 else 0 end) """
type int
- Click Save.
- Click Commit.
- Click Deploy.
In the Create the Visualizations tutorial, a new report is created for a bar chart visualization. The player name parameter is used as a filter.
IN THIS PAGE
Sign up for a forever free account!
Connect to leading SQL databases
Build visual data models without learning a new language
Create two dashboards and ten reports for free