Starburst Galaxy

  • Get started

  • Working with data

  • Starburst AI

  • Context Studio

  • Data engineering

  • Developer tools

  • Cluster administration

  • Security and compliance

  • Troubleshooting

  • Galaxy status arrow_outward

  • Reference

  • Query editor basics #

    The query editor is where you query your data and manage data resources. It consists of two main areas: the data resources panel and the workspace.

    To go to the query editor, click Query > Query editor in the navigation menu, or select Query from themore_vertoptions menu in several locations, including the list of clusters.

    Data resources panel #

    The data resources panel provides an environment for discovering, creating, and managing the data resources available in your Galaxy account. It also provides navigation to related areas in Galaxy.

    All explorer panels include a search field for finding data resources by name. The cluster, catalog, and data product explorer panels, in addition, let you copy resource names and paths to the clipboard, run sample queries, navigate to the corresponding details pane, and create data resources without leaving the query editor.

    • refresh Refreshes the data resources panel.
    • close Collapses the data resources panel.

    The following interactive icons bring you to the resource’s dedicated explorer panel:

    Cluster explorer #

    The following actions and features are available in the Cluster explorer panel:

    • Hover over a cluster to view its name, region, status, type, size, auto-suspend time, and owner.
    • Click themore_vertoptions menu to disable the cluster, select the cluster for querying, and navigate to the cluster’s details pane.
    • Click the tune tuning icon, and check the box to show only data products in the cluster list.
    • Click Create cluster to create a new cluster without leaving the query editor.
    • Expand a cluster to explore its associated catalogs.

    Catalog explorer #

    The following actions and features are available in the Catalog explorer panel:

    At the catalog level:

    • Hover over a catalog to view its name, owner, and associated clusters.
    • Click themore_vertoptions menu to copy the catalog name to the clipboard, select the catalog for querying, navigate to the catalog’s details pane, or perform schema discovery.
    • Expand a catalog to view its schemas and tables.

    At the schema level:

    • Hover over a schema to view its name, catalog, and owner.
    • Click themore_vertoptions menu to copy the full path to the schema to the clipboard, select the schema for querying, execute a sample query, navigate to the schema’s details pane, and create a data product. When you create a data product from the options menu, fields are prepopulated with information from the query editor, which you can modify if necessary.
    • Expand a schema to view its tables, columns, and data products.

    At the table level:

    • Hover over a table to view its name, entity type, schema, catalog, and owner.
    • Click themore_vertoptions menu to copy the full path to the table to the clipboard, execute one or many sample queries, and navigate to the table’s details pane.
    • Expand a table to view its columns.

    At the column level:

    • Hover over a column to view its name, entity type, table, schema, catalog, data type, column value, and nullable status.
    • Click themore_vertoptions menu to copy the full path to the column to the clipboard, execute a sample query, and navigate to the column’s details pane.

    • Click Create catalog to create a new catalog without leaving the query editor.

    Query explorer #

    The following actions and features are available in the Query explorer panel:

    • Expand the Saved queries list and Query drafts list to view all queries in their respective lists. Clicking a query name in a list activates the corresponding tab in the workspace.
    • Hover over a query to view its name, save status, owner, when it was last updated, and who it was shared with.
    • Click the share share icon to get the query link and share it as explained in options menu.
    • Click themore_vertoptions menu to:
      • Configure Query settings as explained in options menu.
      • Delete the query. Click Delete. In the dialog, click Yes, delete.
    • Click the tune tuning icon to filter the query list by Date range, Query owner, and Shared with.

    Data product explorer #

    The following actions and features are available in the Data product explorer panel:

    At the data product level:

    • Hover over a data product to view its name, catalog, and schema.
    • Click themore_vertoptions menu to copy the full path to the data product to the clipboard, select the schema for querying, execute a sample query, and navigate to the data product’s details pane.
    • Expand a data product to view its tables and columns.

    At the table level:

    • Hover over a table to view its name, entity type, schema, catalog, cluster, and owner.
    • Click themore_vertoptions menu to copy the full path to the table to the clipboard, execute sample queries, and navigate to the data table’s details pane.
    • Expand a table to view its columns.

    At the column level:

    • Hover over a column to view its name, entity type, table, schema, catalog, cluster, data type, column value, and nullable status.
    • Click themore_vertoptions menu to copy the full path to the column to the clipboard, execute a sample query, and navigate to the column’s details pane.

    Workspace #

    The workspace is organized into tabs. Each tab contains a SQL editor for writing queries, a button for running them, and an area that displays results. Drop-down menus provide additional options, as described in the following sections.

    • keyboard_command_key Opens a panel displaying available keyboard shortcuts and their corresponding key combinations.
    • help Opens the SQL documentation in a panel.

    Learn more about writing and running queries and using query results.

    Location drop-down menus #

    The workspace contains drop-down menus that let you specify a cluster, catalog, and schema as default settings for SQL statements in the current editor tab. These settings are analogous to the SQL USE statement.

    The selections in these menus persist for each tab separately, and are restored when you reopen a saved query editor tab.

    If you have more than one cluster in your Starburst Galaxy account, you must select a cluster in order to activate the Run button. When you open a new tab, the cluster selection is empty and a message reminds you to select a cluster before querying.

    A green dot in the cluster drop-down menu means the specified cluster is currently running.

    Query editor location-drop-down-menus

    Options menu #

    The more_vert options menu to the right of the Run button provides the following options:

    • Query settings: opens the a dialog where you can perform the following:
      • Rename the query in the Query name field.
      • Select roles to share the query with from the Share with roles or users drop-down menu.
      • Choose an access level from the Access drop-down menu; either Can view and run or Can edit.
      • Share the query link with users with access. Click content_copy to copy the link to clipboard.
      • Click Save to confirm settings.
    • Copy: copies the current editor selection to the clipboard.
    • Prettify: adds spaces, tabs, and newlines to the selected SQL statement where needed.

    Context menu #

    Each query editor tab contains a context menu you can activate in the standard ways: right-click on a right-hand configured mouse, tapping on the right side of a trackpad, and so on. The context menu allows you perform the following actions:

    • Run query: executes the SQL statement that contains the cursor, the fully selected SQL statement, or the set of fully selected SQL statements.
    • Change All Occurrences: use to search and replace a string in a long SQL statement being edited.
    • Prettify: adds spaces, tabs, and newlines to the selected SQL statement where needed.
    • Cut, Copy, Paste: are standard editing commands.
    • Command palette: opens a dialog from which you can select editing commands to run at the current cursor location or run on the current editor selection. With the cursor in the SQL editor, you can also press F1 to open the command palette. Press Esc to exit the palette.

    Manage query editor tabs #

    You can create, edit, organize, and delete query editor tabs directly in the query editor. You can also manage query editor tabs in Saved queries where queries are stored under the query editor tab’s name automatically.

    To create a new tab, click the add add icon at the end of the tab row.

    By default, tabs are titled with the date and time they were created. To rename a tab, click its title and enter a new name.

    Timestamped query tabs and named query tabs persist across login sessions until the tab is closed. After the tab is closed, timestamped query tabs are stored for a particular duration of time as described in Saved queries.

    Drag and drop tabs to rearrange them.

    Learn more #