Skip to content

DS_AV

Process template dedicated to handling Dashboards UI requests on Analyst Visuals.

Analyst Visuals are recommended to target the DS_AV connection group. This group contains the primary ds_av_a instance and the backup ds_av_b instance. The primary instance handles requests if it is available, otherwise the backup instance takes over.

Parameters

The following table details the AV template parameters.

name type default value description
initialStateFunct Analytic dxEmptyFunction Specifies initial state tasks, executed after loading base directory
defaultPlotFunc Analytic dxAVPlotDefault Empty function used for default plotting

Overview

The DS_AV process reduces the load of database processes as it takes over the responsibilities of creating and storing analyst visuals. Communication between DS_AV and the database processes flows through the Query Router Framework making use of the framework’s beneficial features such as load balancing of the target databases.

Creating an Analyst Visual has two main steps:

  1. defining a query to collect the data from the target database(s) and
  2. creating an Analyst Visual plot using the Grammar of Graphics (GG) analyst library.

Requests to the DS_AV process are expected to be wrapped in analytics. The DS_AV process returns an error when the request’s query is defined as a string directly in the Dashboards UI.

Note

The Dashboards UI can still be used for defining plain text queries for single target queries. In this case, the data source should be the target database instead of the DS_AV process. The plot is created and stored in the target database’s cache.

Configuration file

  • Analytic queries must be defined in the DS_AV_CONFIG configuration file. Each entry in the config file must have the query and the targets fields populated with values referencing existing entities.
  • The targets field can reference processes, connection groups, and service classes. In case of multiple targets, a semi-colon separated list should be provided.
  • The query column of the config file is advised to be unique. In the case of duplicates, the last row is used and all other duplicates are ignored.
  • The defaultPlotFunc column’s value is optional, if left blank it defaults to dxAVPlotDefault.
  • The target processes must have access to the query analytics and the AV process must have access to the plotFunc analytics.
  • Query and plotFunc analytics are not tied together, thus plotFuncs are reusable.

Screenshot

Request handling

The DS_AV process collects the data from the targets asynchronously according to the query analytic defined in DS_AV_CONFIG. The corresponding plotFunc must be designed to have a sole input parameter of type dict. This dictionary’s keys are the symbolic names of the targets, and its values are the results of the executed query. In the plotFunc, users should define custom logic to aggregate the data, followed by plot creation logic to call .gg.dash.go with a plot specification. This generates the plot in the memory of the DS_AV process and returns the cache ID to Dashboards where the plot is displayed.

Screenshot