Skip to main content
Version: On prem: 15.0.2

Data sources

A data source defines where the data that will be processed in the survey, is loaded from. A data source can either load data objects from Omada Identity or SQL objects from a SQL data source.

Fields in the data source are mapped to relevant fields on the survey object.

Typically, you will want to apply filters to the returned data objects. This is done differently depending on what data source you use, and whether you want to use scope variables in the filters:

  • SQL data source - with a SQL data source, the survey object is loaded with data resulting from executing a SQL query. This can be relevant if, for example, you want to run a survey loaded with resource assignments from the Warehouse (ODW).

    • There are some considerations you want to acknowledge when writing the SQL query for a survey. Refer to the Data Sources chapter for details.
    • Filters for SQL data sources are written in the query. It is possible to use scope variables in the query.
    • A SQL survey supports multiple rows per object in order to allow multivalued fields.
  • Data object’s data source - loads data objects of one or more Omada Identity data object type in the survey.

    • Data source fields:

      • Values on the data object type are mapped to relevant fields on the survey object.
      • The value mapped to the survey object can either be the value of a property on the source object itself, the result of a reference path expression, or the value of a fixed field.
      • There are some rules on how properties can be mapped.
    • Data source filters - you can define any number of filters to the data object’s data source . The filters are used to limit which data objects are loaded into the survey. Data source filters can only be applied to an Omada Identity data object source.

      • The right-side of a data source filter can be the name of a scope variable. By using this it is possible to limit which data objects are loaded into the survey based on the selections made by the user who launches the survey on the survey initiation screen.
      • You can use a reference path expression to define a filter on a referenced property.
  • Scope variables - they allow you to define variables that can be used to filter the data objects returned in the load from the data source when a survey is launched. These are the scoping options available to the user launching the survey.

    • The scoping options can be configured to allow, for example, limiting the scope on a resource assignment survey for identities that belong to a certain org. unit.
    • Scope variables can also be used in a SQL query data source.
  • Child object reference property - this property allows you to define which property will be used for parent/child surveys. When not set, a standard survey will be generated.

Data sources Markup language

A survey template is authored in the SurveyTemplateML xml language. The schema definition file, SurveyTemplateML.xsd.

Attributes

The table below lists the available attributes for dataSource:

AttributeDescription
TypeIndicates if data should be loaded from Omada Identity (dataObjects) or from SQL (sqlObjects).
NameThe name attribute can be used to add a descriptive name to the data source.
DataObjectType (dataObjects only)The system name of a data object type in Omada Identity.
ConnString(sqlObjects only)The Name of a data connection object. Data connection objects contain a connection string to a database.
ThresholdControls the number of objects loaded into the survey.It can be used during testing of a survey template to prevent that more than a certain number of objects are loaded.The threshold setting should only be used for testing purposes.
childObjectRefPropertyThis property is optional. It is a system name of a reference property on the data object type of the data source. If provided, survey questions will be generated for the values of this reference property on the data objects retrieved from the data source.

The table below lists the available attributes for dataSourceFields:

AttributeDescription
KeyFieldDenotes the key field in a SQL query.
FieldDataObject survey. Denotes the field in the data source. Field should be either: The system name of a property, the name of a fixed field only these are allowed: Id, CreatedBy, DisplayName, or a reference path.SqlObject survey: Denotes a column name in the query
mapToThe objectType property the field is to be mapped to.
datatypeIt is possible to specify the dataType of the field. This is however not a requirement.
mapFromThis is an optional property. Only applicable if the childObjectProperty is set for a data object type data source. The attribute is used to determine if the data source field should be mapped from the parent or the child object.

dataSource filters

A dataObjects data source can have a number of data source filters. The right-side of a data source filter can be the name of a scope variable. For more information, see the Data source filters section.

The table below list the available attributes for dataSourceFilter:

AttributeDescription
PathThe reference path to a data object type.
LeftThe system name of the field (property) the filter will apply to.
OperatorThe match requirements for the right side Possible values:
  • Eq – Equal to
  • Neq – Not equal to
  • Lt – Less than
  • Gt – Greater than
  • Gteq – Greater than or equal to
  • Lteq – Less than or equal to
  • Contains – Contains the value
RightThe right side of the filter. Can be a scope variable.

Scope variables Markup language

The scopeVariables controls the scoping options that are available to the user in the initiate activity of the survey process. The scoping options can be configured to allow, for example, limiting the scope on a resource assignment survey to resource assignments belonging to a specific system.

Attributes

The table below list the available attributes for scopeVariable:

AttributeDescription
NameThe name of the scope variable.
TitleThe text that is displayed in the user interface.
PropertySpecify the objectType property the scope variable relates to.
DataTypeThe dataType of the property. Possible values: Reference String DateTime Boolean* Integer
Requires ValueTrue/False. If set to True the scope variable must be set when launching the survey.
DerivedValuesA reference path that is evaluated using the scope variable's referenced data object(s) as starting point.
DeriveLevelsThe number of recursions to make if using derivedValues.
ShowInUIWhether or not the scope variable should be displayed in the survey initiation activity.
Example
  <scopeVariables>

<scopeVariable name="@system_var" title="Include assignments for resources belonging to this system" property="SYSTEMREF" dataType="reference" requiresValue="true" />

<scopeVariable name="@changedlaterthan_var" title="Only resource assignments that have been changed since this date" property="DEADLINE" dataType="dateTime" />

</scopeVariables>

Scope variables in Filters

Scope variables can be used in data source filters (if the data source type is dataObjects) and in a SQL query (if the data source type is sqlObjects).

DerivedValues

On a scope variable it is possible to state a derived values expression. The purpose is to be able to make a survey of (for example) all identities belonging to a certain org. unit as well as all identities belonging to all descendant org. units.

Example
<scopeVariables>

<scopeVariable name="@orgunit_var" title="Include assignments for identities belonging to this org. unit (and all below)" property="OUREF" dataType="reference" requiresValue="true" derivedValues="\PARTENOU" deriveLevels="3"/>

</scopeVariables>

In the attribute derivedValues it is possible to specify a reference path that is evaluated using the scope variable's referenced data object(s) as starting point. In the attribute deriveLevels it is possible to state the number of recursions to make. In the example we only want to go 3 levels down the org. tree.

info

The example above is based on org. units, but the feature supports all reference properties.