You can use workflow variables in a command task. So, if you define a parameter file with a variable to use in the session's "Target Table Name" field, you should be able to use the same variable in a command task.
Using a session parameter instead of a workflow variable would probably be a better approach for this. Although, it looks like parameters cannot be used in a command task. Pre/Post-session commands accept all kind of variable and parameters, though.
Hopefully someone else has some useful hands-on experience to share in this regard.
this is what the documentation says about it:You can use the following parameters and variables in commands:
- Standalone Command tasks. You can use service, service process, workflow, and worklet variables in standalone Command tasks. You cannot use session parameters, mapping parameters, or mapping variables in standalone Command tasks. The Integration Service does not expand these types of parameters and variables in standalone Command tasks.
- Pre- and post-session shell commands. You can use any parameter or variable type that you can define in the parameter file.
You can find it here:
Please, let me know if it helps you to clarify your doubt.
If you have a mapping variable and in the workflow a workflow variable you can pass the value of the mapping/session variable to the workflow variable.
Hope this helps.
1 of 1 people found this helpful
Not sure this works, but you can give it a try.
There is in built mapping variable $PM<TargetName>@TableName which can then pass on to the session level and invoke the script.