Why query templates exist
Query templates solve three common challenges in data collaboration: Ease of customization. Not everyone who needs data is comfortable writing NQL. Templates let you build sophisticated queries once and expose only the parameters that matter—date ranges, regions, thresholds—so others can customize without touching the query logic. Reusability. When you find yourself writing similar queries repeatedly with minor variations, a template captures the pattern. Change the date range or filter criteria without rewriting the joins, aggregations, or transformations each time. Complexity management. Large queries with multiple joins, conditional logic, and aggregations can be difficult to understand and modify. Templates hide this complexity behind a simple interface of named placeholders, reducing the cognitive load for users who just need to run the query.Templates vs. saved queries
Both templates and saved queries let you reuse NQL, but they serve different purposes:| Aspect | Saved query | Query template |
|---|---|---|
| Variability | Static—runs the same way every time | Dynamic—placeholders filled at execution |
| Audience | Query author who wants quick access | Anyone who needs customized results |
| Modification | Edit the full NQL to change behavior | Fill in placeholders without editing NQL |
| Use case | Personal shortcuts | Shared, parameterized queries |

