Data query defines which data should be extracted from the data source. For databases, that would typically be the SQL query; for Excel file, that would be sheet name, etc. The system allows you to create parameterized and non-parameterized queries.
-
Create a new non-parameterized query with name = "Test" (example query: select * from Products)
-
Open "Data Queries" from "Admin" menu
- "Data Queries" is open.
- You can change the view, use sort and search.
- Use search in "Data Queries" to find the "Test" query
- Query "Test" will find.
- Call context menu for data query. Test the functionality of the context menu items.
- Context menu is open.
- All its elements work correctly
- Open "Query view" for "Test" query, edit it and run without saving
- Query completed.
- Enter an incorrect query and run it
- Warning about errors in the query is shown
- Open "Data Query Runs" from "Admin" menu
- "Data Queries Runs" is open
- You can change the view, use sort and search
- The list shows the status of run and start time
-
Run query from different places (context menu, Context Panel, by double-clicking)
-
Find in the list queries from the previous paragraphs
- Queries are present in the list
- The runtime is correct
- Queries with errors are marked with color coding
- Open the "Details" tab in Context Panel
- "Details" tab is open
- The correct information for all fields is displayed (Author, Created, Updated, Connection, Tags, Params – for parameterized queries)
- Open the "Query" tab in Context Panel
- "Query" tab is open
- Display current text of query
- Open the "Activity" tab in Context Panel
- "Activity" tab is open
- Display information about tables that were created after the query was executed.
- Run the "Test" query
- Look on "Activity" tab
- New record about actually query is added here
- Open the "Usage" tab in Context Panel
- "Usage" tab is open. Display query runs statistics.
- Delete "Test" query
- "Test" query deleted successfully
- No any errors and exceptions
- Create a new parameterized query with name = "Test_param"
- New parameterized query created
- Check this in "Data Queries" in menu "Admin"
- Open the "Run" tab in Context Panel for " Test_param" query
- "Run" tab is open, there are fields for entering parameters
- Run parameterized query with correct parameters
- Parameterized query is run
- Check this in "Data Query Runs" in menu "Admin"
- Run parameterized query with not-correct parameters (nulls, incorrect types of input data, incomplete data for strings, negative values for numbers, error datetime, etc.
- Warning about incorrect input parameters is shown to user.
The scenarios listed in clauses 2-17 must also be performed for parameterized queries
example parameterized query:
--input: int employeeId = 5
--input: string shipVia = = 3 {pattern: int}
--input: double freight = 10.0
--input: string shipCountry = "France" {choices: ["France", "Germany", "USA", "Finland"]}
--input: string shipCity = "starts with r" {pattern: string}
--input: bool freightLess1000 = true
--input: datetime requiredDate = "1/1/1995"
--input: string orderDate = "after 1/1/1995" {pattern: datetime}
SELECT * FROM Orders WHERE (employeeId = @employeeId)
AND (freight >= @freight)
AND @shipVia(shipVia)
AND ((freight < 1000) OR NOT @freightLess1000)
AND (shipCountry = @shipCountry)
AND @shipCity(shipCity)
AND @orderDate(orderDate)
AND (requiredDate >= @requiredDate)*
See also: