Query the Space Data

This functionality is not currently available in the Command Line Interface, REST Manager API, or Administration API.

The GigaSpaces Ops Manager and the Web Management Console support SQL queries, enabling users to perform actions on the data objects in the Space.

For example, to query a specific class:

SELECT * FROM my.company.com.MyPojo WHERE rownum < 1000

For a Document object with nested properties, you can code:

SELECT Address:city_name as city_name  FROM my.company.com.MyPojo WHERE rownum < 1000

where the field city_name is a property of the Address object.

Query a Space

  1. In the Spaces Overview page, click a Space to drill down to the Space details.
  2. Click on an Object type.
  3. Click the SQL Editor tab.
  4. Modify the SQL query as necessary, and click Run Query. The time it took the query to complete is shown below the query area, and the results are displayed in the Results area.

The query must contain the full class name. Additionally, the query must contain a row limit, and GigaSpaces adds a 1000-row limit by default if you try to run your query without adding the limit yourself.

The maximum number of rows allowed in a query is 10,000.

You can also export your query results to a CSV file.

  1. In the Spaces view, highlight the Space or the Space instance you want to query.

  2. Display the Queries pane in the lower area of the view.

  3. Type a query, or click a data type from the Types pane.

  4. Click Execute Query.

    The query is executed against the selected Space or Space instance. If there are too many results to display on a single web page, you can navigate using the paging controls at the bottom of the table. Paging is static (results are fetched once per execute request).

  5. If you have tried to run multiple queries, you can navigate between them using the Go Back/Go Forward buttons, or select a query from the dropdown lists next to these buttons.

  6. To export the results of a query:

    1. Click Export.

    2. Select an action (Open, Save, or Cancel).

    The results are exported in a zipped CSV file.

    support SQL queries, enabling users to perform actions on the data objects in the Space.

    For example, to query a specific class:

    SELECT * FROM my.company.com.MyPojo WHERE rownum < 1000
    

For more information, refer to the GigaSpaces Management Center topics in the Administration section.

 

Query an Object Type

When viewing single Space data within the Space Overview page, the IT administrator or developer can drill down to a selected Object Type by clicking on the name of an Object Type in the Object Types table at the bottom of the page.

Navigate to Object Type page

It is possible to drill down from the Space overview page to the Object Type level in two ways:

  • Click on the Object Type line within the Object Types data table. In this scenario, the user drills down to the overview page of an Object Type.
  • Click on the icon to the left of the Object Type name. It is possible to drill down to the Object Type SQL editor page with the Object Type context already selected within the sample query.

Query a Data Object in a Space

When viewing single Space data within the Space Overview page, the IT administrator or developer can drill down to a selected Object Type by clicking on the name of an Object Type in the Object Types table at the bottom of the page.

Navigate to Object Type page

It is possible to drill down from the Space overview page to the Object Type level in two ways:

  • Click on the Object Type line within the Object Types data table. In this scenario, the user drills down to the overview page of an Object Type.
  • Click on the icon to the left of the Object Type name. It is possible to drill down to the Object Type SQL editor page with the Object Type context already selected within the sample query.