You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/using-parameters.mdx
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ title: "How to use parameters"
3
3
---
4
4
5
5
<Warning>
6
-
Parameters are an **experimental** feature. See our [Feature Maturity Levels](/references/feature-maturity-levels) documentation to understand what this means.
6
+
Parameters are an **experimental** feature. See our [Feature Maturity Levels](/references/feature-maturity-levels) documentation to understand what this means.
7
7
</Warning>
8
8
9
9
<Info>
10
-
Parameters are defined in the `lightdash.config.yml` file, which is not supported when your project is connected to dbt Cloud.
10
+
Parameters are defined in the `lightdash.config.yml` file, which is not supported when your project is connected to dbt Cloud.
11
11
</Info>
12
12
13
13
**Parameters** are variables that allow you to create **dynamic, reusable queries** in Lightdash. They enable users to interact with and customize queries without needing to write SQL.
@@ -199,10 +199,9 @@ WHERE region IN (${lightdash.parameters.region})
199
199
200
200
This query will filter orders by the regions selected in the `region` parameter and by the date selected in the `date_range` parameter.
201
201
202
-
203
202
## Saving parameter values at chart and dashboard levels
204
203
205
-
One of the powerful features of parameters is that their values can be saved at both the chart and dashboard levels.
204
+
Parameter values can be saved at both the chart and dashboard levels.
206
205
207
206
### Saving parameter values in charts
208
207
@@ -218,16 +217,16 @@ The parameter values will be saved with the chart and will be applied whenever t
218
217
219
218
### Saving parameter values in dashboards
220
219
221
-
You can also save parameter values at the dashboard level, which allows you to create dashboards with consistent filtering across all charts.
220
+
You can also save parameter values at the dashboard level, which allows you to create dashboards with consistent parameter values across all charts.
222
221
223
-
To save parameter values with a dashboard:
222
+
To save parameter values in a dashboard:
224
223
225
224
1. Create or edit a dashboard
226
225
2. Add charts to the dashboard
227
226
3. Set the parameter values as desired
228
227
4. Save the dashboard
229
228
230
-
The parameter values will be saved with the dashboard and will be applied to all charts on the dashboard.
229
+
The parameter values will be saved with the dashboard and will be applied to all charts on the dashboard that have parameterized fields.
231
230
232
231
## Best practices for using parameters
233
232
@@ -236,5 +235,5 @@ Here are some best practices to follow when using parameters:
236
235
1. **Use descriptive names**: Choose parameter names that clearly indicate their purpose
237
236
2. **Provide default values**: Set default values for parameters to ensure queries work even if users don't set parameter values
238
237
3. **Add descriptions**: Include clear descriptions for parameters to help users understand their purpose
239
-
5. **Consider using options_from_dimension**: For parameters that should match values in your data, use `options_from_dimension` to dynamically populate options
240
-
6. **Consider performance**: Be mindful of how parameters affect query performance, especially with large datasets
238
+
4. **Consider using options_from_dimension**: For parameters that should match values in your data, use `options_from_dimension` to dynamically populate options
239
+
5. **Consider performance**: Be mindful of how parameters affect query performance, especially with large datasets
0 commit comments