Concepts → Filter Expression Session Variable

About Filter Expression Session Variables

A filter expression session variable defines an immutable string value. The purpose of the string value is to specify a a filter expression. In this manner a schema developer, dashboard developer, or similar user can create a filter expression as a reusable object, and in turn, easily reference that reusable object for multiple dashboard filters, insight filters, or runtime security filters.

When a user signs in to the Analytics Service, the Analytics Service — as a web application — creates a session (HttpSession in Apache Tomcat) for the user. A session maintains state information between requests for a particular user of a web application.

The first time the user invokes an filter expression session variable — usually by means of a calling expression such a dynamic applied filter or filter option — the Analytics Services creates an instance of the variable for the user with the value set to the filter expression string. For the duration of the user's session the variable value exist solely in the scope of the user session and is immutable.

You can use the Schema Manager to create and test a filter expression session variable. Using the Formula Builder, a schema developer or similar user can define a filter expression session variable.

You can reference a filter expression session variable in specific expression contexts such as a filter option for a dashboard, an applied filter, or insight filter. You can assign access rights to a filter expression session variable.

Note

Starting with 2023.7.0, you can use the Schema Manager to view the data lineage of filter expression session variables that you own or have access rights to. You can track entities referenced in a filter expression session variable, that is, its source or upstream lineage and entities that reference the filter expression session variable, that is, downstream lineage. For more details, refer to Tools → Data Lineage Viewer.

The Name of a filter expression session variable:

  • must be between 1 and 250 characters in length
  • must begin with an alpha character (lower or upper case) or an underscore (_)
  • after the first character, can contain zero or more alphanumeric characters in lower, upper, or mixed case
  • besides underscores (_), cannot contain special characters, symbols, or spaces
  • must be unique
  • is case-sensitive

Where can you create a filter expression session variable

You can create a filter expression session variable from the Schema Manager by using the Formula Builder. You need to sign in to Incorta Analytics with a user account that has the Schema Manager role.

Valid references in a filter expression session variable

Here are the types of objects that you can reference in a filter expression session variable:

Valid contexts to reference filter expression session variables

After creating a filter expression session variable, you can reference it in the following contexts.

Object TypeFilter TypeConfiguration
Business Schema Incorta Analyzer ViewIndividual Filter (Dynamic)Add a new formula to the Individual Filter tray, enable Dynamic, and then select a filter expression session variable.
Business Schema Incorta Analyzer ViewMeasure Filter (Dynamic)The Incorta Analyzer View must be for an aggregated table. Expand the measure properties, add a new formula to the filter tray, enable Dynamic, and then select a filter expression session variable.
Dashboard FiltersApplied Filter (Dynamic)Add a new formula to the Applied Filters tray, enable Dynamic, and then select a filter expression session variable.
Dashboard FiltersFilter Options (Dynamic)Add a new formula to the filter option, enable Dynamic, and then select a filter expression session variable.
Insight FiltersIndividual Filter (Dynamic)Add a new formula to the Individual Filter tray, enable Dynamic, and then select a filter expression session variable.
Insight FiltersMeasure Filter (Dynamic)Expand the measure properties, add a new formula to the filter tray, enable Dynamic, and then select a filter expression session variable.This does not apply to all insight types (listing table is an example).
Physical Schema Incorta Analyzer TableIndividual Filter (Dynamic)Add a new formula to the Individual Filter tray, enable Dynamic, and then select a filter expression session variable.
Physical Schema Incorta Analyzer TableMeasure Filter (Dynamic)The Incorta Analyzer Table must be an aggregated table. Expand the measure properties, add a new formula to the filter tray, enable Dynamic, and then select a filter expression session variable.
Note: Runtime Security Filter context

In some contexts, a reference to a filter expression session variable may produce unexpected results. For example, if you select a filter expression variable as the filter value of a regular runtime security filter, you most likely will not achieve an expected result. However, if the filter expression session variable simply defines a filter value as a string such as Electronics, then the filter expression session variable will function as a filter value.

Access rights for an filter expression session variable

A Super User (tenant administrator) or a user that belongs to a group assigned the SuperRole or the Schema Manager role can create, view, and edit the filter expression session variables in a given tenant.

Note: Super User and SuperRole access rights
  • When the Cluster Management Console (CMC) admin turns the Enable Super User Mode option on, the Super User and users with the SuperRole can manage all session variables regardless of the access rights.

  • Only the Super User tenant administrator can view all session variables regardless of the access rights and the Enable Super User mode option.

The following are the available access rights for a filter expression session variable:

PropertyIconDescription
Can VieweyeThe user can View the filter expression session variable, for example, in the Formula Builder.
Can Sharenode treeThe user is able to Share the filter expression session variable with other users.
Can Editpen and paperThe user is able to Edit the filter expression session variable.

Test a filter expression session variable

If you have edit access rights to a filter expression session variable and belong to a group with the necessary role access permission such as Schema Manager or SuperRole, you can test the variable. There are two forms of testing a session variable:

Test: The result of the variable for the current user.

Test As: You can select a different user to test how the variable will display information for that user. This is useful when testing if permissions are configured properly or the output of the variable is dependent on the user.

Note

The result of a test of a filter expression variable is the filter expression itself as a string.

Steps to test a filter expression session variable

Here are the steps to test a filter expression session variable:

  • Sign in to the Incorta Direct Data Platform.
  • In the Navigation bar, select Schema.
  • In the Schema Manager, select the Session Variables tab.
  • In the list view, select a filter expression session variable.
  • In the Filter Expression dialog, select on of the following:
    • Select Test to view the result as the current user.
    • Select Test As, and then select a user to view the results as that user.
  • Select Cancel.

Additional considerations for a filter expression session variable

Here are some additional considerations for working with a filter expression session variable:

  • Modification
  • Owner of a scheduled job

Modifications

If the owner or a user that belongs to a group with Edit access rights to a filter expression session variable alters the filter expression for the variable object and saves the modifications, the Analytics Service deletes the session variable for all other active users. For this reason, schema developers should be wary of altering filter expression session variables in production while not in maintenance window. When a user invokes the filter expression variable again, the Analytics Services creates a new instance of the variable for the user.

Owner of scheduled job

The owner of a scheduled job for the email delivery of a dashboard defines the user session for the emailed dashboard. If the dashboard or dashboard insights contain references to a filter expression session variable, the value of the filter expression variable is defined by the user session of the scheduled job owner.