Create Parameter Dataset
What is a Parameter?
Parameters are numbers that summarize data for an entire table.
(I) Creating a Parameter While Creating a Dataset
-
Follow this procedure to create a dataset. (Note: Follow the steps until No. 20 for this example).
-
Click on the Add Parameter option, and you will see a window like the image below:
-
Enter the required details as follows:
- Name: The parameter name must be unique. This will be used for linking the parameter when creating a parameter dataset (required field).
- Direction: This feature is under development and will be available in subsequent releases.
- Data Type: A data type is a classification that specifies which type of value a variable has and what type of mathematical, relational, or logical operations can be applied to it without causing an error. By default, it is selected as IN Data Type.
- Procedure Type: This feature is under development and will be available in subsequent releases.
- Default Value: Enter the required column name here (required field).
- Linked Parameter: This option is only required when creating a Cascade parameter.
- Is Hidden: The parameter value will be applied but will not be visible to the end user.
-
For example, we filled in the data as shown in the image below:
-
Click on Submit, and your parameter will be created.
-
To use the created parameter, write the given query (refer to the note below for the query) in your query window as shown below:
as d where productLine in ()
-
Select the created parameter from the drop-down as shown in the image above.
-
Click the button Use Parameter, and you will see that the parameter is pasted in the query window as below:
-
Now go to the Preview tab, and you will see your screen as shown below:
-
Write “Classic Cars” in the text box and click on Submit. The Preview tab will show the data for “Classic Cars” only.
- Click on the Submit button, and the parameter dataset will be created.
(II) Creating a Parameter by Writing a Query in the Query Window
-
Follow this procedure to create a dataset. (Note: Follow the steps until No. 5 for this example).
-
Now, write the query in the Query window as given below (refer to the note for the query):
select * from products where productLine in ({{productLine}})
-
Click on the Preview button, and you will see the textbox asking for the parameter as shown in the image below.
-
Write “Classic Cars” in the text box and click on the Submit button. The Preview tab will show the data for “Classic Cars” only.
-
Click on the Submit button, and the parameter dataset will be created.