Open topic with navigation

TIBCO® Patterns 6.1.2

# Using the Query Builder Platform to Test a Query

The Query Builder Platform provides a command-line interface for testing a query definition. The two steps used to test a query definition are verifying that the configuration file is correct and verify that the query retrieves the desired records.

## Verifying the configuration

This step verifies that the configuration file defining the query is valid and generates a valid TIBCO Patterns query. The command-line tool scans the configuration producing a log of all errors and questionable items found in the configuration. On request, it creates a copy of the configuration file with error messages added as annotations to the associated items in the configuration. This is often the best way to locate where the errors are in a large and complex configuration.

## Verifying the query

Verifying that a configuration is valid does not verify that the query it defines returns the desired results. To do that you must run the query and examine the query results. The command-line interface allows you to run a query against a TIBCO Patterns server using data from CSV files or a TIBCO Patterns server.

A configuration file defines how the queries are run. This is a separate configuration file from the one that defines the query. In this file, you can specify the source data for generating the queries and a target TIBCO Patterns server, on which the queries are run.

The query source can be a set of CSV files, one for each table defined for the query. The rows in the files must be sorted by the `PARENT` key value. The records in the CSV files are merged into compound records. These compound records are used as the input to the defined query builder.

Alternatively, the query source can be a TIBCO Patterns server. Compound records are read from the server based on the table structure in the query definition.

By using the query run configuration file, you can remap the table and field names for the query source and the target server. You can also specify a cutoff score applied to all queries, and a maximum number of queries to run.

Details about the format of the configuration file used to define a query run can be found in the `RunQuery.xsd` schema file located in the `query_builder/schema` directory. The `run_customer1.xml` sample query run configuration file is provided in the `query_builder/samples` directory.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Patterns

Copyright © 2010-2025. Cloud Software Group, Inc. All Rights Reserved.