Working with Queries

Queries gather data from a specific data source (which can be an Oracle database, a SQL server source, or a CSV file). Queries generally start with the usual SELECT statement to obtain the data values for various data source fields.

A set of example SQL queries is provided within the Evisions Data Model online reference. See Using the Example Queries for more information.

In many cases your Evisions representative will analyze your data and data sources, and then create a set of queries customized to your institution. You have the option, however, of creating your own queries if you want to do so.

Creating a Query with the Query Editor

The query editor window is a text editor that you use to enter the query. You can copy and paste into the editor, and then edit the query once it is in the editor window. The query editor supports standard text commands such as Ctrl-A (select all), Ctrl-C (copy), and Ctrl-V or (paste). (Cmd-A, Cmd-C, and Cmd-V for MacOS.)

Best Practices for working with queries
    If you are creating an extensive query, you may find it easier to create the query in another text editor, then copy and paste it into the DORIS query editor.

    Save your editing work often by copying the query to another editor, such as Notepad.

Editing a Query

You can edit the query used for an entity directly in the query editor. If you edit a query that was already run, you can undo your changes (select Reset Query) up until you test the new edits. Once you test a query, it is automatically saved. It then becomes the version that is restored when you reset the query (if you have not tested another query).

If you edit the query for a previously published query, you will need to test the query again before you can proceed to the data mapping stage.

Testing a Query

Once you have entered your query, select Test Query to do a preliminary ingestion of the data. If the query is successful, the columns below the query editor will be populated with data extracted from the data source that you specified for the entity.

The values returned for each data source field in the query are listed below the query editor. The header for each list includes the name of the data source field.

If the test is not successful, no values will be returned, and you will not be able to continue to data mapping.

If you recently edited a working query, you can use Reset Query to revert back to the last working query.

 

See also: