Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

The Table tab (shown in Figure 1) provides a textual representation of your data. In the simplest case where you open an instance of the Charting Tool with a single time series, the Table tab will contain two columns, one with time-stamps and the other with observations corresponding with that time-stamp. The date format is taken from your computer's system settings, which can be changed using the System settings.

If you assemble two or more graphs in the Chart tab, the Table tab will contain additional columns, one per graph, with the observations aligned with respect to time.

  • The Date column refers to the start of the water year; and
  • Enabling the Filter matching rows checkbox will filter the table (as per the Search criteria) and remove non-matching entries. Note that this process may be slow depending on table size and host machine.

You can use the Search functionality to view data that falls within a range, for example. The field accepts boolean characters as well.

Figure 1. Table tab

Anchor
ShortHeader
ShortHeader
The tick box at the bottom right allows you to toggle how the column headings are displayed - in long or short form. For example, if the column contents were "Latest Run > Minimum Flow Requirement > Lake Release > Upstream Flow Volume" the short header would be "Upstream Flow Volume: Latest Run" which provides basic information about the column contents and is easier to read but may not provide all the information required.

 

Info
iconfalse

Note: The date is displayed (and can be modified) as per the short date format set in the host computer's Control Panel (see figure below).


 

Anchor
TQL
TQL
Table Query Language

Introduction

The Table Query Language (TQL "tickle" [tik-uh l]) is an interpreted language used as part of the Source Recorder Manager / DORA table view to highlight / filter columns based on user specified criteria.  Queries are entered by the user into the search bar at the top of the columns and the results are highlighted within the table columns.  An optional filtering check-box can also be selected which will ensure that only rows containing matches are displayed.   Successful queries (meaning those that have resulted in cell matches result in the query string)  are displayed in green, while unsuccessful queries are displayed in red.

Supported Features

TQL can be used to search for the following information:

  • Arbitrary strings - these attempt to match the characters typed in to any raw content shown in any of the cells.  e.g., "01/07" will match any year's date "01/07/2001", "01/07/2002"
  • Date Range - only a block of dates can be specified.  e.g., "01/07/2001 > && < 01/07/2002"
  • Any Field Value - numeric logic applied to all cells e.g., "> 10 && < 20"
  • Specific Column Value - like the any field match but specific to particular columns e.g., "$1 > 10 && $2 < 20"
  • Cross Column Comparisons - look for relationships between columns e.g., "$1 > $2"
Center

Language Structure

There are two main search types:

  1. String - these searches attempt to find the entered substring in any table cell.  No logical expressions can apply to these searches as they have no contextual information.
  2. Expression - these searches determine the actual value of the cell in the appropriate format and allow for logical relationships

Which are based around four main types of cell information

  1. Dates (Expression) - e.g., "01/07/2001"
  2. Numerics (Expression) - e.g., "155.51"
  3. Column Specifications (Expression) - e.g., "$1"
  4. Arbitrary Strings (String) - e.g.,  "12/1", "12."

When a search is entered into the table, the parser will attempt to always match an Expression search.  In cases where this fails it will revert back to a String search.  Both String and Expression searches can be combined but no equality can be used to qualify the String portion

For example, if the user entered  "12/1" it would be a String search as there is not enough text entered to form a full date. This would result in it scanning through all cells and matching any in the Date column which contain the exact substring.   Entries such as: "12/10/2005" and "05/12/1001" would be highlighted.  However, if a full valid date is entered such as "12/10/2005" then this would be an Expression search and only the "12/10/2005" would be matched.  The downside of String searches is that they no not allow for any logic expressions as there is no context to the match.  So the user can't look for later dates based on the "> 12/1" String search, where-as the Expression search "> 12/10/2005" will.

Equality

The equality operations supported are shown in Table 1. It can be noted that the not equal and equal operators have two versions which can be used.  This is for flexibility and both versions operate in an identical manner.

Table 1. Table Query Language, Comparison operators

Operator

Meaning

>

greater than

<

less than

>=

greater than or equal

<=

less than or equal

= or ==

equal

!= or !

not equal

Logical / Boolean

The following boolean / logical operations are supported:

  • "&" or "&&" - logical AND
  • "|" or "||" - logical OR

As with the equality operators, boolean AND and OR have two versions which can be entered but each operate identically.  They evaluate each side of the expression and then combine the results as specified using boolean logic.

  • AND is true when both sides of expression are true
  • OR is true when either or both sides of the expression are true

TQL does not currently support any other logical connectives such as XOR.

Column Notation

When wanting to specify a particular column, the user can enter the column number (starting at 0) preceded by the dollar symbol ("$").  So to specify the Date column the user would enter "$0" whereas to specify the first value column they would enter "$1".  At evaluation time the parser will replace the column specified with the particular cell value and then evaluate.  This is useful for looking for relationships amongst two different time-series.

Tip
titleAny Column

When no column is specified it is assumed any column can match

Center

Date Format

TQL can use dates as a value for evaluation.  It does this by converting the Date value into the machine's current Date culture.  This means that user should be aware of if they are using "dd/mm/yyyy" or "mm/dd/yyyy" format specifiers as part of their general operating system set-up.  Dates can only be used to compare and perform logical comparisons to other Dates within the first column ("$0")

Tip
titleDetermining Culture

A rule of thumb is to copy the format used in the Date column as this will already be in the culture specific format.

TQL Examples

The following examples show typical usage, all date usages assume a culture format "dd/mm/yyyy".  For clarity, queries that are interpreted as a String search are indicated with an (S) while Expression searches are marked with an (E)

 

Center

Appendix A - Language Definition

TQL is a context-free grammar which ignores white-space.  The Extended Backus-Naur Form metasyntax for TQL is as follows:

EBNF

   Statement := String | Expression, Logical Expression };
  Expression := [Value] Logical Value;
       Value := Number | Date | Column;
      String := Digit | Point | Slash { Digit | Point | Slash };
     Logical := "&&" | "&" | "|" | "||";
    Equality := "<" | "<=" | ">" | ">=" | "!=" | "!" | "==" | "=";
      Column := "$"Natural;
        Date := Digit [, Digit]SlashDigit [, Digit]SlashDigitDigitDigitDigit;
     Natural := Digit {Digit};
     Integer := ["-"]Natural;
       Point := ".";
       Slash := "/";
       Digit := "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
      Number := Integer[PointDigit {Digit}];