All Products
Search
Document Center

Hologres:Manage SQL scripts

Last Updated:Dec 08, 2025

This topic describes how to create, edit, delete, copy, and rename SQL queries in HoloWeb. The SQL window is designed for interactive, short queries. It is not suitable for offline job scenarios, such as importing or exporting large volumes of data. SQL statements that run for more than 60 minutes are not supported.

Prerequisites

You have logged on to a Hologres instance. For more information, see Log on to an instance.

Access the SQL editor

  1. Log on to the Hologres console.

  2. In the top navigation bar, select a region.

  3. In the left navigation pane, click Go to HoloWeb.

  4. In the top menu bar of HoloWeb, click SQL Editor.

Create a script

Procedure:

  1. In the left Query panel, right-click My SQL query and select Create SQL Query.

    Alternatively, click the image icon at the top of the Query panel to create a temporary script. After execution, click Save to save the content of the current SQL editor.

  2. In the Create SQL Query dialog box, configure the following parameters.

    Parameter

    Description

    Job Name

    The name of the SQL query.

    Directory

    The folder where the new SQL query is stored.

    The default folder is My SQL query. You can also store the query in a new folder.

    New Folder

    The folder where the new SQL query is stored. You can choose to store the query in a new folder.

    Instance Name

    Select your Hologres instance.

    Database Name

    Select your database.

  3. Click OK.

    You can use PL/pgSQL for development in the SQL editor.

    image

    Note

    Table names and field names in SQL queries are not case-sensitive. To perform a case-sensitive query on a table name, enclose the name in double quotation marks ("").

    Area

    Description

    Displays the instance name, instance ID, database, current virtual warehouse, and current time zone for the SQL query.

    • Saves the content in the current SQL editor.

    • Refreshes the SQL editor.

    All table information in the current destination database:

    • Run: Executes the SQL query.

    • Execution Plan: View execution plans.

    • Analyze: View the analysis.

    • Stop: Stops the execution.

    • Format: Formats the SQL command(s).

    • Document Settings: Supports setting the editor, parameters, and time zone.

    • More: Supports importing or exporting SQL, or going to DataWorks DataService Studio for SQL development.

    • image: Searches runtime logs.

    • image: Closes all logs, jumps to the last page of logs, or displays logs.

    • image: Saves the logs.

    • image: Pauses log scrolling.

    • image and image: Expands or collapses the log display area.

    Note
    • In HoloWeb, SQL queries have a maximum execution time of 60 minutes. If a query exceeds this duration, it will be cancelled with a timeout error, indicating: cancel query due to timeout, queryTimeout setting is: 3600s.

    • Setting the statement_timeout parameter to a value greater than 60 minutes will not extend this maximum SQL execution time. For more information, see Modify the timeout period for an active query.

Manage an existing script

  1. Navigate to the SQL Editor page as described in Access the SQL editor.

  2. In the Query pane on the left, click My SQL query and find the target script. Perform the following operations:

    Note

    If the target SQL script is in a folder, search it by name in the search box under Query.

    • Edit a script: Double-click the script to edit it in the SQL editor.

    • Delete a script: Right-click the SQL query and click Delete SQL Query Task.

    • Copy a script: Right-click the SQL query and click Copy SQL Query Task. You can then paste the copied SQL statements into another SQL query window.

    • Rename a script: Right-click the SQL query and click Rename. You can then enter a new name for the SQL query.