|
|
Contents of this GuidePrerequisites
Functional Units ConfigurationFor more information about what are the Functional Units, see functional units general description. The functional units configuration takes place in the conf/opal-config.xml file, functionalUnits section. Unit NameThe unit name is required and is the one to be provided with the --unit option of some commands: import and keystore. Participant Identifier VariablesWhen importing participant's data, two kinds of participant's unique identifiers are to be handled:
Then the unit's configuration will specify:
opal-config.xml Keystore ConfigurationFor each functional unit there is a keystore containing the encryption key pairs (private key and certificate). The unit's keystore configuration is done by running some specific commands. See keystore command for more details. In the case of assessment centres collecting data using Onyx, define only one functional unit for all sites and use the --alias option of the keystore command to store each site encryption key pairs. Datasources ConfigurationThe datasources configuration takes place in the conf/opal-config.xml file. The datasources need to be declared before performing a copy for instance. Depending on your needs, the datasources will be persisted in different type of schema, the currently supported ones being:
EAV DatasourceDefault Opal datasource (opal-data) is persisted in a EAV based schema. This schema is able to persist several datasources. So if you want to add a new datasource persisted this way, simply declare the additional bloc: opal-config.xml JDBC DatasourceOpal can be connected to an external database schema (SQL) using a JDBC datasource. In other words, it gives read/write access to external data within Opal. Configuring a JDBC datasource takes place in the file conf/opal-config.xml. The following is an example of a basic configuration (within the factories node). Example opal-config.xml nameThe name which will be used in Opal to refer to this datasource. jdbcPropertiesThis configuration is specific to the external database instance to which the Opal will connect to. driverClassName : The JDBC driver supplied by the database vendor. settingsThese optional settings are specific to the JDBC datasource, they allow more control over its behavior. More specifically, they allow the specification of the mapping between the SQL database tables with the Opal entities. settings defaultEntityType : The default Opal entity which will be used for mapping a SQL table (if none has been specified, see tableSettings below). tableSettingsIn certain cases, it may be necessary to configure how the JDBC Datasource maps a specific table. This is possible to do using the tableSettings node. In the example above, table settings are defined for the SQL table named "nonstandard_table". For any table, it is possible to specify the following mapping details: tableSettings sqlTableName : The table name in the SQL schema. Note that the tableSettings node is optional; if no table-specific mappings are necessary, the node may be omitted. Variable Views ConfigurationThe definition of a view is expressed in terms of:
View definition uses extensively the Magma Javascript API. The configuration takes place in the file conf/opal-config.xml. selectSelect the variables that will be part of the view. In the current version, the variable selection is done using a javascript. The return value of the javascript is a boolean telling whether or not the currently evaluated variable is part of the view. If this statement is omitted, all the variables of the from statement are part of the view. This statement is exclusive to the variables statement. Use the copy command to get the variables catalogue of the tables. Example Select the variables which name starts with Participant or contains DO_YOU_SMOKE: variablesEnumerates the derived variables that are part of the view. The from statement needs to be specified so that the derived variables scripts are resolved. the variable script attribute is used to specify how to resolve the values for the derived variable. The script syntax is based on Magma Javascript API. This statement is exclusive to the select statement. Example fromIn the current version, a view is a subset of one table or of joined tables. Each table is identified by its fully qualified name. This statement is required. Use the show command to get the list of the tables available in the system. Examples From one table: From joined tables: whereSelect the value sets that will be part of the view. In the current version, the value set selection is done using a javascript. The return value of the javascript is a boolean telling whether or not the currently evaluated value set is part of the view. If this statement is omitted, all the value sets of the table are part of the view. Use the copy command to get the variables catalogue of the table. Example Select the value sets for which the answer to the question DO_YOU_SMOKE is neither DNK nor PNA. Attaching a View to a DatasourceOnce defined using the select / variables / from / where statements, the view can be attached to any datasource: it can be the same datasource as the one the table belongs to, or a dedicated datasource. Example conf/opal-config.xml |
Search Opal Documentation |
Opal Configuration Guide
Labels:
None