Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Overview

This step helps users who want to use variables at the session level for transformations. For example, users can include this step with the Call Endpoint step in a transformation which allows them to hit their BA Server session when the transformation is run.

Description

The Get Session Variables step allows you to retrieve the value of a session variable. This step can return rows or add values to input rows.

Note: You must specify the complete variable specification in the format ${variable} or %%variable%% (as described in Variables). You can also enter complete strings in the variable column, not just a variable. For example, you can specify: ${java.io.tmpdir}/kettle/tempfile.txt and it will be expanded to /tmp/kettle/tempfile.txt on Unix-like systems.

See Also:

Call Endpoint

Set Session Variables

Options

Option

Description

Step Name

Name of the step as it appears in the transformation workspace. This name must be unique within a single transformation.

#

The order the fields will be passed.

Field

Name of the field which will receive the value retrieved from the session variable. If a value cannot be retrieved, the default value is used.

Variable

Specify the name for the session variable which you want to retrieve for this step. Specify the value using a complete string to return rows or add values to input rows. For example, you can specify: ${java.io.tmpdir}/kettle/tempfile.txt and it will be expanded to /tmp/kettle/tempfile.txt on Unix-like systems.

Default Value

Specify the default value for the variable.

Samples

Six example transformations are included in the attached archive.  

  • callEndpointExample.ktr -- This transformation executes three different endpoint calls where the module, service , and method are parameterized from the input fields.
  • setSessionVariable.ktr -- This transformation illustrates setting a session variable from an input stream. The Data Grid step is used to generate the field.
  • getSessionVariable.ktr -- This transformation retrieves the variable defined in the SetSessionVariable.ktr sample.
  • getRolesForUser.ktr -- This transformation fetches the roles for the 'Admin' and 'Suzy' personas by executing two calls to the /userrolelist/getRolesForUser endpoint.
  • listRepository.ktr -- This transformation executes two calls to the repository, fetching the folder structure from the repository from /Home. One call is executed with a depth of '1' and the other with a depth of '4'.
  • showPlatformVersion.ktr -- This transformation executes an endpoint call to retrieve the platform version.