Looking for the previous version? View v2024.06 documentation →
Query Studio — Global Query Settings
Configure platform-wide query settings and manage reusable scalar functions.
Overview
The Query Studio section under System Preferences provides administrators with global configuration options for queries across the platform. A key capability is the management of Scalar Functions — reusable SQL functions that can be referenced in queries throughout Data Trust. Administrators can create, edit, and delete scalar functions, as well as configure additional query-wide settings that apply to all users.
Prerequisites
- You are logged in to Data Trust with a Pro-User or Admin Pro-User role.
- Admin Console access has been granted by your system administrator.
Navigating to Query Studio Settings
Path: Data Trust › Admin Console › System Preferences › Query Studio
Figure 1: Admin Console — System Preferences entry point
Navigate to Admin Console and then to System Preferences to access all platform-wide configuration settings. The Admin Console is accessible from the main navigation bar and requires an Admin Pro-User role. System Preferences tiles are displayed on this landing page — each tile represents a separate configuration area.
Figure 2: System Preferences options overview
The System Preferences page shows all available configuration tiles for the Data Trust platform. Locate the Query Studio tile on this page to access global query settings and scalar function management. Scroll down if the tile is not immediately visible, as the number of tiles displayed depends on your screen resolution.
Figure 3: Query Studio option tile
Click the Query Studio tile to open the global query configuration screen where scalar functions and query-wide settings are managed. Settings configured here apply to all users running queries in Data Trust. Changes to scalar functions are immediately available in the query editor and reconciliation scenario configuration.
Managing Scalar Functions
Scalar functions are user-defined SQL functions that return a single value. Once created in System Preferences, they are available for use in any query or reconciliation scenario within Data Trust.
Viewing Scalar Functions
Figure 4: Scalar Functions list
The Scalar Functions list displays all functions defined at the platform level, including their name, parameters, and SQL definition. Each function row provides Edit and Delete action icons for managing existing functions. Functions listed here are available in the query editor for all users with access to Query Studio.
Creating a Scalar Function
- Click the Create or Add button on the Scalar Functions page.
- In the dialog that appears, provide the function name, parameters, and SQL body.
- Click Save to create the function.
Figure 5: Create Scalar Function dialog
The Create Scalar Function dialog requires a unique function name, one or more input parameter definitions, and the SQL expression body. Ensure the SQL syntax is compatible with your connected database engine (for example, SQL Server, Oracle, or PostgreSQL). Review the function definition carefully before saving, as errors in the SQL body will cause failures when the function is called in queries.
Figure 6: Scalar Function created successfully
A success message confirms that the new scalar function has been saved and is now available platform-wide across all query editors. The function immediately appears in the Scalar Functions list and can be referenced in any new or existing query without additional configuration. Share the exact function name with team members so they can start using it in their queries.
Editing a Scalar Function
- Locate the scalar function you want to modify in the list.
- Click the Edit icon next to the function name.
- Update the required fields and click Save.
Figure 7: Edit Scalar Function — selecting the function
Click the Edit icon on any existing scalar function row to open its editing interface. The Edit icon is visible in the action column at the right end of each function row. Editing a function that is actively used in saved queries will update the behaviour of those queries on their next execution.
Figure 8: Edit Scalar Function pop-up
The Edit Scalar Function pop-up is pre-filled with the current function definition, allowing targeted modifications to the name, parameters, or SQL body. Make only the changes required and review the full definition to ensure no unintended alterations are introduced. Click Save in the pop-up to apply the changes once you are satisfied with the updated definition.
Figure 9: Scalar Function edited — reviewing changes
After editing, the dialog shows the complete updated function definition for final review before saving. Pay particular attention to parameter names and data types if the function is referenced in production queries. Confirm that the SQL body is syntactically correct and that all referenced columns or tables still exist in your database.
Figure 10: Scalar Function edited successfully
A confirmation message indicates the scalar function has been updated and the changes are immediately live across the platform. Queries and scenarios that reference this function will use the updated definition on their next run. Inform relevant team members if the function behaviour has changed so they can verify their dependent queries.
Deleting a Scalar Function
- Locate the function to delete and click the Delete icon.
- Confirm the deletion in the pop-up dialog.
Figure 11: Scalar Function delete confirmation pop-up
The delete confirmation pop-up ensures that scalar functions are not removed accidentally from the platform. Before confirming, verify that no active queries, validations, or reconciliation scenarios reference this function. Deleting a function that is still referenced will cause those queries to fail on their next execution.
Figure 12: Scalar Function deleted successfully
A success message confirms deletion; the function is removed from all future query drop-downs and autocomplete suggestions immediately. Any saved queries that previously used this function will need to be updated before they can run again. Consider searching for the function name in Query Studio to identify and update affected queries promptly.
Additional Settings
Figure 13: Additional Settings for Query Studio
The Additional Settings panel provides further query-wide options such as query timeout values, default execution modes, and result set limits. These settings apply globally to all users running queries in Data Trust, so changes should be reviewed with your team before saving. Adjust timeout values carefully — setting them too low may cause legitimate long-running queries to fail prematurely.
Figure 14: Menu button options in Query Studio
The menu button on the Query Studio settings page provides quick access to bulk actions such as exporting the current configuration or resetting Query Studio settings to their defaults. Use the export option to back up your scalar function list before making bulk changes. Resetting to defaults will remove all custom scalar functions and revert timeout settings, so use this option with caution.