Use the OGSA-DQP GUI client

Using the OGSA-DQP GUI client, you can interact with a DQP coordinator, create DQP resources, get the imported schemas, submit queries and view query plans. The GUI client provides an alternative to the command-line client as a means of interacting with OGSA-DQP.

You may also find it helpful to watch the installation movie

Build the client

Change into the OGSA-DQP GUI client directory:

$ cd ogsadqp-3.2.1-od30port/gui

Build the client:

Start the client

To start the client:

$ cd ogsadqp-3.2.1-od30port/gui
$ ant gui

Administrator mode and client mode

The client can be used in two modes:

Administrator mode

Select an OGSA-DAI service (DQP coordinator)

Before executing any queries in user mode, it is necessary to import a DQP resource in administrator mode. As the client starts off in user mode, you need to change to administrator mode by selecting Switch mode from the User menu.

Now that the GUI is in administrator mode, you can add an OGSA-DAI service that exposes DQP resources i.e. import a DQP coordinator. Select Add OGSA-DAI service from the Admin menu. You will be presented with a dialog with a drop-down list of default URLs:

Selecting an OGSA-DAI service
service (DQP coordinator)

The OGSA-DAI data service you select should be one that is configured to be a DQP coordinator i.e. it exposes a DQP factory resource, and, optionally, may also expose a number of DQP resources.

When you have selected a service and clicked OK the client will contact the service and get a list of all the resources it exposes. The GUI will then display the type of resource they are e.g. whether they are DQP factory resources, DQP resources or other types of OGSA-DAI data resource. Below is an example of the client importing the resources exposed by the DQP testbed setup. This service exposes a single DQP factory resource:

Contacting an OGSA-DAI
service (DQP coordinator)

The resource selection tree on the left of the window is now populated with the service and the resources it exposes, for example:

Resources tree

Create a DQP resource

The client allows DQP resources to be created by executing a workflow containing the DQPFactory activity targeted at a DQP factory resource.

To create a DQP resource, in administrator mode right-click on the DQP factory resource you want to use and select Create DQP Data Resource from the pop-up menu. The client will ask the DQP factory resource for its configuration resource property and a window will appear that displays this:

DQP factory configuration

The top half of the window displays the default configuration of the DQP factory resource that it will use when creating DQP resources.

The bottom half of the window displays the client configuration that will be sent by the client. As you know from the page on OGSA-DQP factory configuration documents any client configuration values will override default configuration values.

By default, the client sends an empty configuration document which will not overwrite any of the default factory configuration. To load a configuration document, click on the Load button and a file selection dialog will appear. Alternatively, you may type in the XML configuration document manually.

When you are ready - either having decided to use the default empty configuration, or have loaded your own, or have typed one in - then click Create

The client will create a workflow to execute the DQPFactory activity. If the DQP coordinator has been deployed correctly and your factory configuration document is valid then a new DQP resource will be created and a message will be displayed. The DQP resource will be added to the resource selection tree and is now available for querying in user mode.

Resource selection tree

Get the imported schemas of a DQP resource

In adminstrator mode you can also get the imported schemas resource property of any DQP resources. Click on the DQP resource of interest and from the options that appear, doube-click on Schema. The service will be contacted and the resource asked to provide its imported schemas. These will then be displayed:

DQP Data Resource imported schemas

Get the configuration of a DQP resource

In adminstrator mode you can also get the configuration resource property of any DQP resources. Click on the DQP resource of interest and from the options that appear, doube-click on Configuration. The service will be contacted and the resource asked to provide its configuration. These will then be displayed:

User mode

Once a DQP resource has been created and added to the client, it is possible to execute queries. You need to switch to user mode by selecting Switch mode from the Admin menu.

Select a DQP resource

Because you might have imported a number of DQP resources when in administrator mode you first need to select one. Select Select DQP Data Resource from the User menu. You will be presented with a dialog what allows the selection of an OGSA-DAI service (DQP coordinator) and one of the DQP resources exposed by that service:

Selecting a DQP resource

The list of services/resources presented by the dialog are those that have been imported during administrator mode. Firstly select a service, then select a DQP resource exposed by the service. Following this, all subsequenct queries will be executed using the selected resource.

View the imported schemas

Once a DQP resource has been selected, a schema icon will appear which can be selected to view the impored schemas of the databases exposed by the resource, over which queries can be composed. Double-click on the schema icon displayed near the top-left corner of the GUI to display the schema.

Execute a query

To compose a query, select Query from the User menu. An window will appear allowing a query expession to be entered:

Composing a query

A number of sample queries are provided which can be executed using the DQP testbed or you can type in your own.

The query guide provides an overview of the sorts of SQL queries that OGSA-DQP can handle. A final ; at the end of the query is vital.

To load a sample query, select a sample query number from the Load sample drop-down list. The selected query expression will appear in the query window.

To execute the query, click Submit If the query execution is successful, the following dialog will appear:

Successful query execution dialog

The client will also contact the service and ask for the query plan resource property from the DQP resource.

Two new icons will then be associated with the query in the resources tree - one to provide the results and one to provide the query plan.

Resources tree - query plan and
	results icns

Double-clicking on Query results will present a window displaying the results of the query, for example:

Query results window showing results
in a table

Double-clicking on Query plan will present a visualisation of the query plan as a graph, for example:

Example visualisation of query plan

Each elliptical node in the plan represents a logical operator. The labels describe the parameters of the operators. All nodes contain a label describing the operator type e.g. PROJECT. It should be noted that exchanges are implemented as producer/consumer pairs and therefore a list of producers and corresponding consumers is given alongside these. It can be seen that groups of operators are bounded by a dashed area. This denotes that this sub-plan is evaluated in parallel on the list of computational nodes given in the upper left-hand corner of the bounding area.

The original XML representation of the query plan can also be selected by clicking on XML in the top right hand corner of the query plan window.

Export query results

The client allows you to export results in the XML WebRowSet format. To export the results of a query, right click on Query results in the resources tree and select Export. A file selection dialog will appear allowing you to specify a file into which the XML is to be saved.

Delete queries

To delete any queries and their associated query plans/results, right-click on the relevant query in the resources tree and select Delete.


Previous: Use the OGSA-DQP command-line client Next: Developing applications using the OGSA-DQP client toolkit classes