Query Editor
  • 24 Jan 2022
  • 1 Minute to read
  • Dark
    Light

Query Editor

  • Dark
    Light

Article Summary

Overview

The Query Editor is a Designer-level tool inside the Decisions Portal that allows a user to write Queries against any established Database Connection. These Queries can be saved for future use and are available for quick access. Additionally, the results of any Query can be downloaded and saved as a CSV file.

To ensure that data is not caught in the cache, changes in the Query Editor should be followed by a service restart.

The Query Editor can be found by right-clicking any Designer Project and then selecting Other > Query Editor.

In v7.10+, the option Allow Designers to Use Query Editor has been added under System > Settings > Designer Studio Settings > QUERY EDITOR. If this option is checked, all Designer users will have access to the Query Editor and will be able to execute queries.


Features of the Query Editor

  1. When the Query Editor opens there is a Connection drop-down menu that allows the user to chose the Local Connection or any other established database connection. For this brief example keep Local Connection selected.
  2. Search for "entity_account" via the Search bar; this provides the ability to search for specific Tables
  3. Inspect the schema of a Table by expanding the dropdown to the left of the Table name. 
  4. Generate a Query against a table by selecting the Action menu icon when hovering over a Table. Users can generate Delete, Insert, Select, and Update Queries.
    Alternate Query Method 
    As the Query Editor allows the ability to perform Queries on Tables within a selected Database, SQL Queries may also be Generated manually by providing them in the form of text input in the box on the left-hand side, and then clicking RUN. 
  5. In the entity_account action, menu select Generate "Select" Query.
  6. After choosing Generate "Select" Query, notice the left-hand panel populates. Select Run.
  7. After the Query runs users have the ability to take the results of the Query and export them to a CSV file (via Download as CSV). If desired, users also have the ability to save the query for future use by selecting Save, naming the query, and selecting Save once more.
  8. Back in the Designer Project users can see recent queries and have the ability to re-run them.

Was this article helpful?