Table of Contents

Search

  1. Preface
  2. Understanding Pipeline Partitioning
  3. Partition Points
  4. Partition Types
  5. Pushdown Optimization
  6. Pushdown Optimization and Transformations
  7. Real-time Processing
  8. Commit Points
  9. Row Error Logging
  10. Workflow Recovery
  11. Stopping and Aborting
  12. Concurrent Workflows
  13. Grid Processing
  14. Load Balancer
  15. Workflow Variables
  16. Parameters and Variables in Sessions
  17. Parameter Files
  18. FastExport
  19. External Loading
  20. FTP
  21. Session Caches
  22. Incremental Aggregation
  23. Session Log Interface
  24. Understanding Buffer Memory
  25. High Precision Data

Advanced Workflow Guide

Advanced Workflow Guide

Working with Session Parameters

Working with Session Parameters

Session parameters represent values that can change between session runs, such as database connections or source and target files.
Session parameters are either user-defined or built-in. Use user-defined session parameters in session or workflow properties and define the values in a parameter file. When you run a session, the Integration Service matches parameters in the parameter file with the parameters in the session. It uses the value in the parameter file for the session property value. In the parameter file, folder and session names are case sensitive.
For example, you can write session logs to a log file. In the session properties, use $PMSessionLogFile as the session log file name, and set $PMSessionLogFile to TestRun.txt in the parameter file. When you run the session, the Integration Service creates a session log named TestRun.txt.
User-defined session parameters do not have default values, so you must define them in a parameter file. If the Integration Service cannot find a value for a user-defined session parameter, it fails the session, takes an empty string as the default value, or fails to expand the parameter at run time.
You can run a session with different parameter files when you use
pmcmd
to start a session. The parameter file you set with
pmcmd
overrides the parameter file in the session or workflow properties.
Use built-in session parameters to get run-time information such as folder name, service names, or session run statistics. You can use built-in session parameters in post-session shell commands, SQL commands, and email messages. You can also use them in input fields in the Designer and Workflow Manager that accept session parameters. The Integration Service sets the values of built-in session parameters. You cannot define built-in session parameter values in the parameter file. The Integration Service expands these parameters when the session runs.
The following table describe the user-defined session parameters:
Parameter Type
Naming Convention
Description
Session Log File
$PMSessionLogFile
Defines the name of the session log between session runs.
Number of Partitions
$DynamicPartitionCount
Defines the number of partitions for a session.
Source File
$InputFile
Name
Defines a source file name.
Define the parameter name using the appropriate prefix.
Lookup File
$LookupFile
Name
Defines a lookup file name.
Define the parameter name using the appropriate prefix.
Target File
$OutputFile
Name
s
Defines a target file name.
Define the parameter name using the appropriate prefix.
Reject File
$BadFile
Name
Defines a reject file name.
Define the parameter name using the appropriate prefix.
Database Connection
$DBConnection
Name
Defines a relational database connection for a source, target, lookup, or stored procedure.
Name the parameter using the appropriate prefix.
External Loader Connection
$LoaderConnection
Name
Defines external loader connections.
Define the parameter name using the appropriate prefix.
FTP Connection
$FTPConnection
Name
Defines FTP connections.
Define the parameter name using the appropriate prefix.
Queue Connection
$QueueConnection
Name
Defines database connections for message queues.
Define the parameter name using the appropriate prefix.
Source or Target Application Connection
$AppConnection
Name
Defines connections to source and target applications.
Define the parameter name using the appropriate prefix.
General Session Parameter
$Param
Name
Defines any other session property. For example, you can use this parameter to define a table owner name, table name prefix, FTP file or directory name, lookup cache file name prefix, or email address. You can use this parameter to define source, lookup, target, and reject file names, but not the session log file name or database connections.
Define the parameter name using the appropriate prefix.
The following table describes the built-in session parameters:
Parameter Type
Naming Convention
Description
Folder name
$PMFolderName
Returns the folder name.
Integration Service name
$PMIntegrationServiceName
Returns the Integration Service name.
Mapping name
$PMMappingName
Returns the mapping name.
Repository Service name
$PMRepositoryServiceName
Returns the Repository Service name.
Repository user name
$PMRepositoryUserName
Returns the repository user name.
Session name
$PMSessionName
Returns the session name.
Session run mode
$PMSessionRunMode
Returns the session run mode (normal or recovery).
Source number of affected rows
$PM
SourceQualifierName
@numAffectedRows
Returns the number of rows the Integration Service successfully read from the named Source Qualifier.
Define the parameter name using the appropriate prefix and suffix.
Source number of applied rows
$PM
SourceQualifierName
@numAppliedRows
Returns the number of rows the Integration Service successfully read from the named Source Qualifier.
Define the parameter name using the appropriate prefix and suffix.
Source number of rejected rows
$PM
SourceQualifierName
@numRejectedRows
Returns the number of rows the Integration Service dropped when reading from the named Source Qualifier.
Define the parameter name using the appropriate prefix and suffix.
Source table name
$PM
SourceName
@TableName
Returns the table name for the named source instance.
Define the parameter name using the appropriate prefix and suffix.
Target number of affected rows
$PM
TargetName
@numAffectedRows
Returns the number of rows affected by the specified operation for the named target instance.
Define the parameter name using the appropriate prefix and suffix.
Target number of applied rows
$PM
TargetName
@numAppliedRows
Returns the number of rows the Integration Service successfully applied to the named target instance.
Define the parameter name using the appropriate prefix and suffix.
Target number of rejected rows
$PM
TargetName
@numRejectedRows
Returns the number of rows the Integration Service rejected when writing to the named target instance.
Define the parameter name using the appropriate prefix and suffix.
Target table name
$PM
TargetName
@TableName
Returns the table name for the named target instance.
Define the parameter name using the appropriate prefix and suffix.
Workflow name
$PMWorkflowName
Returns the workflow name.
Workflow run ID
$PMWorkflowRunId
Returns the workflow run ID.
Workflow run instance name
$PMWorkflowRunInstanceName
Returns the workflow run instance name.
Define parameter names using the appropriate prefix and suffix. For example, for a source instance named “Customers,” the parameter for source table name is $PMCustomers@TableName. If the Source Qualifier is named “SQ_Customers,” the parameter for source number of affected rows is $PMSQ_Customers@numAffectedRows.

0 COMMENTS

We’d like to hear from you!