Mittwoch, 10. Juli 2024

How to get the parameter values logged?

While the parameter file is set on workflow level, the logging thereof is not. You can get the parameter values relevant to a session by setting the "Override tracing" in the "Error handling" section of the "Config Option" tab of the session properties to "Verbose init". With "Verbose data" you also get the parameter values logged, however, it is not advisable to set it unless for debugging as it writes the values of each processed record in each transformation to the log this making it explode and slow down the process to tears.





Montag, 2. Oktober 2017

$PMWorkflowName contains worklet name

Problem (PowerCenter 10.1.1 HF1)

I wanted to use $PMWorkflowName to check within a worklet within which workflow it runs. However, it seems that it does not contain the workflow name but the worklet name. At least the check in the connector miserably fails and using it as command name shows the worklet name.

Test case




    
        
            
            
            
        
        
        
            
            
            
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
            
        
        
        
            
            
            
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    



Work-around

  1. Define workflow variable.
  2. Assign $PMWorkflowName to the workflow variable in an assignment element.
  3. Define worklet variable.
  4. Assign the workflow variable to the worklet variable with a pre-worklet assignment. (This is needed only on the first level in case of cascading worklets. However, I did not test, if this is needed for later executed worklet cascades on the top level.
  5. Use the worklet variable for the check in the worklet.





    
        
        
            
            
            
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
            
        
        
        
            
            
        
        
        
            
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    


Dienstag, 19. September 2017

Precedence of variable value definition

Documentation


Test


Parameter file: global not that global

Problem

I have this mapping using two variables with persistent values which I wanted to override. So I put the desired values into the parameter file into the global section. And... nothing happened. The variable assignment did not show up in the logs.

Solution

When I put the variables into the according mapping section and everything was fine.

Mittwoch, 28. Juni 2017

Throw application errors (variable/output port)

At times one whishes to throw an error on certain condition. A rather obvious way to do is in an expression by means of the ERROR() or the ABORT() function. You can do this at two locations.
  1. Output port: Be aware that this only works if the outport is connected to another transformation. Unconnected output ports are not evaluated at all. Possibly, this is an efficiency measure by PowerCenter.
  2. Variable port: This works also if it is no further used. Be aware that if you do not remove unused variable ports, you bloat your mapping (code). I am not aware of an efficient method of detection of unused variable ports. It would be nice if PowerCenter would only execute unused variable ports if they contained the ERROR() or the ABORT() function.

Montag, 15. Mai 2017

PLS-00306: wrong number or types of arguments

This is a bit a hidden one as PowerCenter does not state what exactly it is sending against the data base from a stored procedure transformation - not even with tracing set to Verbose Data.


It appears that PowerCenter sends the parameter by position not by name, and it does not support boolean data type.


This leads to following:
  • You cannot have a boolean parameter in a Oracle procedure/function wanting to us it from within PowerCenter.
  • You cannot take advantage of default values of parameters of Oracle procedures/functions.
You might want to write a suitable wrapper.