bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Building Queries and Data Views

 Previous Next Contents Index View as PDF  

Saving a Query

From the Test tab, you can save a query by choosing File—>Save Query from the menus or by clicking on the Save Query button on the toolbar.

You can save the query to a file on a local folder or other location on the network, or you can save the query to the Liquid Data server Repository in the stored_queries folder as described in the following section.

Note: Query files must be saved with a .xq extension. If you do not specify an extension, the Data View Builder automatically appends the .xq extension to the filename when the query file is saved.

Saving a Query to the Repository as a "Stored Query"

If the query is saved into the stored_queries folder in the Liquid Data server Repository, it becomes a stored query in Liquid Data. There is a performance benefit to using stored queries in Liquid Data in that the query plan is automatically cached in Liquid Data and you have the option to configure caching on the query result as well. For more information about using stored queries, see Stored Queries in Overview and Key Concepts.

To create a stored query do the following:

  1. On the Test tab, choose File—>Save Query from the menus. (The File—>Save Query menu option is available only from the Test view.)

    This brings up a file browser.

  2. Use the file browser to navigate to the Repository.

  3. The stored_queries folder is the only Liquid Data server repository directory available from the Data View Builder. This is the appropriate location in the repository in which to save a query.

  4. Enter a name for the query in the File name field on the file browser and click Save. The query is saved to the stored_queries folder in the server repository with the appropriate .xq extension which identifies it as a stored query in Liquid Data.

You can reload a stored query using the Data View Build File : Open Query command. You may need to navigate to the directory containing your stored queries.

Once a stored query has been loaded, it can be run. See Running the Query for details.

Naming Conventions for Stored Queries

 

Back to Top Previous Next