Clients can use the DQP functionality in two ways:
The following sections describe both these tasks.
Querying a DQP resource is identical to querying any other relational resource. To send a SQL query to resource the SQLQuery activity (SQLQuery) should be cited in your workflows. In addition to writing your own OGSA-DAI workflows using either the client toolkit or as an XML workflow document OGSA-DAI provides a simple command line client to query relational resources, see Chapter 68, Example relational data resource client.
In DQP table and attribute (column) names are case sensitive. Users must use the names exactly as they appear in the schema.
It is also possible to get the database schema from a DQP resource. Again this is identical to getting a database schema for an OGSA-DAI relational resource. The ExtractTableSchema activity (ExtractTableSchema) is provided for this task. OGSA-DAI provides a simple command line client to get the schema from a relational resource, see Chapter 69, Example relational schema display client.
Clients can create new DQP resources using the CreateDQPResource activity (CreateDQPResource) if the activity has been deployed. OGSA-DAI provides a command line client that invokes this activity to create a new DQP resource.
Before calling the activity we must write a DQP resource configuration file specifying the DQP federation we wish to create. DQP resource configuration files are XML files and are described in detail in Section 132.2.2, “Deploy a DQP resource with a configuration file”.
Once we have a DQP configuration file we can use the command line client
to create the new DQP resource. Run the following Run the following,
$ java uk.org.ogsadai.client.toolkit.example.CreateDQPResource \ -u SERVICES-BASE-URL -r RESOURCE-ID -f DQP-CONFIG-FILE
Having created a new DQP resource it can be queried as described in Section 133.1, “Querying a DQP resource” above.