SQL Browser

This chapter details how a Hazelcast cluster can be queried with SQL using Management Center. (Please see the SQL Statements section of the Hazelcast documentation for details about SQL queries.)

You can use the SQL browser for this purpose, which can be opened using the SQL Browser menu item found in the top menu.

Once you select the SQL Browser menu item, the browser opens as shown below:

SQL Browser Window

  • Dropdown for selecting a map to quickly build a simple query

  • Text field to enter or edit SQL queries

  • Execute Query button

  • Clear Query Result button

  • Query Results tab

  • History tab

  • Export as CSV button

To query a map, select its name from the dropdown. If the map does not have a mapping, an autogenerated CREATE MAPPING statement will be inserted into the editor. If the map already has a mapping, an autogenerated SELECT statement will be inserted into the editor.

To execute the autogenerated query, click Execute Query button.

SQL Browser listing maps

After a successful query execution, the contents of the Query Result, JSON View and History tabs are rendered.

You can see the result of your query in the Query Results tab. You can click on the Export as CVS button to export the query result as a CSV file in a format RFC 4180

A list of query results

On the JSON View tab, you can see the same data represented in JSON format. You can click on the Copy to Clipboard button in the top right corner to copy the result into your clipboard.

JSON query results

On the History tab, you can see the history of query execution. It holds last one hundred executed queries. Each row contains Execution Time, Execution Status and Query values. You can re-execute any query from the history by pushing a button in the Execute column.

A history of executed queries