SpaceDeck – Data Query
This part of the system allows you to execute a SQL query against the data in the Space Where GigaSpaces data is stored. It is the logical cache that holds data objects in memory and might also hold them in layered in tiering. Data is hosted from multiple SoRs, consolidated as a unified data model..
Although the Space is a NoSQL data store, it exposes an SQL interface which is used for Data Queries.
Define the Query
Fill in the data query parameters, as shown below.
Data Query Parameters
-
(Source drop-down list) – Select which GigaSpaces Space object the service should be executed against. If there is more than one Space, then the specific source will have to be defined. If there is just one Space, this is defined automatically.
-
(Body of the query) – Create a SQL-99 compliant query. Initially there is an example query service displayed in gray, As soon as you click on that area, it is replaced by a blank screen ready for you to create your query.
-
Retrieve first – limit the query response to the desired number of rows. A maximum of 10,000 rows can be retrieved.
- Saved Queries - A list of previously saved queries. If one is selected, then the option of Run Query.will be displayed.
- Run Query -Click to test the query. The query results will be displayed. If there is a problem with the query a Query validation failed error will be displayed at the bottom of the screen, like this:
-
Save Query - Save the query which will then be accessible via the Saved Queries drop-down.
For XAP GigaSpaces eXtreme Application Platform. Provides a powerful solution for data processing, launching, and running digital services, first create a table and then insert data.
An sample SQL used for creating a table:
Create table in XAP SpaceDeck GigaSpaces intuitive, streamlined user interface to set up, manage and control their environment. Using SpaceDeck, users can define the tools to bring legacy System of Record (SoR) databases into the in-memory data grid that is the core of the GigaSpaces system. via Data Query:
CREATE TABLE Person(Id INTEGER PRIMARY KEY,FirstName VARCHAR(20),LastName VARCHAR(30),Age INTEGER)
An sample SQL used for inserting data:
INSERT INTO Person VALUES(20,'test1',1, 'test1')
Run the Query
Click Run Query to execute the query. The query results will appear as shown below.
When viewing the query results, additional options is available:
-
Export – Export the query result locally to a csv-format file
-
Deploy – Allows a service to be created and deployed from a data query as an API endpoint, that will then appear in the list of Services in the Service menu.
For XAP Skyline A highly customizable developer platform that allows building scalable HA with high throughput and ultra-low latency Java applications running on Kubernetes clusters the Deploy option is not relevant.
When clicking Deploy the following screen is displayed:
Fill in all the details and click Create Service. You will then be redirected to the Service & Microservices main menu where you will see your new service listed with the Status of Created.
For details about the next steps of service deployment, refer to SpaceDeck – Services