Skip to main content
Skip table of contents

Query Studio

image-20250131-054956.png

Query Studio is a powerful SQL-based interface that empowers users with data discovery, exploration, and self-serve analytics capabilities. By leveraging the intuitive interface, you can write and execute SQL queries against supported data sources, enabling quick insights and analysis. Query Studio is ideal for both technical users, such as data analysts and engineers, and non-technical users familiar with SQL who wish to perform ad hoc data analysis. Let’s quickly take a look at all that Query Studio offers:

SQL-Based Query Interface

  • Write and execute SQL queries to explore and analyze your data.

  • Perform custom aggregations, joins, filters, and more, with the flexibility of SQL.

Supported Data Sources

  • Query Studio currently supports select data sources, such as:

    • Snowflake

    • More to be added soon

Result Management

  • Download as CSV: Export query results as a CSV file for offline analysis or sharing.

  • Save Results: Store query results within the portal to facilitate data visualization.

Seamless Integration with Dashboards and Reports

  • Saved query results can be directly used for creating dashboards and reports within the portal.

  • Scheduled Report delivery to your inbox.

Getting Started with Query Studio

1. Navigate to the Query Studio under Analytics within the ZMP left-hand Nav bar.

Ensure that you have the necessary permissions to access the module and the connected data sources.

2. All permitted data tables will be listed under the Databases Tab.

  • The Column section displays Column metadata with options to:

    • Preview the table

    • View Data Dictionary

3. Use the SQL editor to write your query.

  • The editor provides SQL keyword highlighting and type assist to help with query formation.

  • Queries are auto-saved and an option exists to save your work.

  • Click the Run Query button to execute your query.

4. Query results are displayed in a tabular format under the Results tab for easy review.

image-20250117-182121.png
  • Use Search to look up a specific value in Results.

  • Select specific columns within Results to quickly analyze selected columns without rerunning queries with fewer columns.

5. To download results, click the Download CSV button.

6. To save results for Visualization and ongoing Reporting in ZMP, use the Create New Dataset under the Save option and provide a meaningful name and description for Visualization in Report Builder.

Use Cases

  • Ad Hoc Analysis: Effortlessly analyze data trends, apply aggregations, and detect anomalies using flexible, custom SQL queries.

  • Self-Serve Analytics: Empower your team to independently explore and manipulate data without relying on pre-built datasets or dashboards.

  • Seamless Reporting: Generate and save datasets from your final query results, enabling ongoing reporting and visualization.

  • Scheduled Reports: Configure automated report delivery using query outputs generated through the Report Builder.

Best Practices

  • Optimize Queries: Use filters, indexed columns, and efficient joins to improve query performance.

  • Save Frequently Used Queries: Reuse saved queries for consistency and efficiency.

  • Validate Results: Cross-check query outputs with expected results to ensure data accuracy.

  • Appropriate Permissions: Restrict Query Studio access to users proficient in SQL to prevent accidental query or dataset deletions or costly long-running queries.

  • Leverage Aggregation Policy: Control access to granular data by managing aggregation policy and permissions.

Troubleshooting

Query Execution Errors

  • Ensure that your SQL syntax is correct.

  • Check if you have the necessary permissions to access the queried tables.

  • Transient connection errors may occasionally occur. Please try again shortly, or contact support if the issue continues.

Aggregation Policy

  • Certain tables may have enforced aggregation policies to safeguard against granular data exposure. If you receive a notification regarding this policy and believe it is unnecessary, please contact your account team to explore potential adjustments.

  • If you want to check whether a table has an aggregation policy, look at the Data Dictionary view, and “is_restricted” = True indicates the object(table/view) has policy enforced.

Slow Query Performance

  • Review your query for inefficiencies (e.g., unnecessary joins or lack of filters).

  • Optimize your query by indexing key columns or reducing the result set size by limiting it to a shorter time range.

Issues with Export or Save

  • Check for browser-specific issues if the CSV download fails.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.