Litmus Excel AddIns
...
Litmus DataHub AddIns
DataHub Queries In-Depth Guide...

Configure DataHub Query Parameters

11min

You can configure the query parameters by setting the order of results, applying limits to your query, and specifying the time range for your data queries.

Before You Begin

Steps to Configure Order, Limit, and Time Range Parameters

This guide discusses three key parameters that you can configure. These elements include:

  • Ordering: Managing the query order (ascending or descending).
  • Limit: Setting or removing a limit on the query results.
  • Time Range: Determining the segment of data to query from the table.

Configure Order of Queries

  • The Order By element manipulates the ordering section.
  • By default, the ordering is set to ASCENDING.
  • To change the order, switch the setting to DESCENDING from the drop-down menu. Note: This adjustment is directly reflected in the Query Statement.

Note: A Query Statement is a live display that reflects the user's configuration parameters—like order, limit, and time range—allowing for real-time data retrieval from the DataHub or external Database.

Document image


Configure Limits of Queries

  • The Limit parameter is not set by default.
  • When a Limit is applied, the adjustments become visible in the Query Statement.
  • The SLIMIT option restricts the number of series returned by a query, similar to how the LIMIT clause restricts the number of points.
  • Removing respective settings (Limit or SLimit) will hide the respective sections from the Query Statement.
Document image


Configure Time Range of Queries

The time range parameter determines the section of the table from which data is queried.

Using the Dropdown

  • The Litmus DataHub Queries interface provides preset time frames via a drop-down menu.
  • These presets are designed to simplify stopping data pull and setting the appropriate time range.
Document image


Using the Time Range Editor

If a preset does not meet your needs, click the Edit (pencil icon) button to use the time range editor.

Document image

  • The default values shown are typically From as minus one hour and To as the current time.
  • The From value must always be in the past.
  • Click the Edit (pencil icon) next to the From or To input box to change the time unit using a numeric spinner (e.g., hours, minutes, seconds, days, weeks, months, or years).
    • This allows precise control over the time span, such as setting the query for the last four hours.
Document image

  • Click the Calendar icon next to the Edit button to query data requiring a specific date range.
    • Once applied, the query consistently pulls data from the specified fixed time frame regardless of subsequent updates.
Document image

  • After defining the Time Range parameter, click Save.
  • The saved settings will modify the time range and immediately reflect the changes in the Query Statement.
Document image


Key Points to Remember

  • It is possible to freeze the From value and let the To value update.
    • This approach enables continuous data accumulation, useful for comparative analyses or experiments.
  • You can use relative time for dynamic reports that update, such as always pulling data from the last five to eight hours.
  • The Time Range Editor provides the option to configure the range into the past or future.
    • Example: To extract data from six to eight when running the query at nine o’clock, adjust the range accordingly.