Mittwoch, 1. Februar 2017

Parameter cascading variable assignments

I strongly feel that it is NOT possible to cascade variable assignements using user defined variables/parameters (the ones with the double $ at the beginning)

The following two samples fail with an error on recursion.
$$DATE_FORMAT=YYYY-MM-DD
mplt_TEST.$$DATE_FORMAT=$$DATE_FORMAT

mplt_TEST.$$DATE_FORMAT=YYYY-MM-DD
$$DATE_FORMAT=mplt_TEST.$$DATE_FORMAT
The following does not throw an error when variable assignment is carried out but the assignment is done literally.
$$DATE_FORMAT=YYYY-MM-DD
mplt_TEST.$$MPLT_DATE_FORMAT=$$DATE_FORMAT
So the variable/parameter contains the literal string
$$DATE_FORMAT
I, however, could assign "built in" variables/parameters (the ones with the single $ at the beginning) to user defined ones. Sometimes the last part of the "built ins" can be chosen freely why I put built in in quotation marks.

Dienstag, 31. Januar 2017

Expression/Query editor warped

First of all, many thanks to Rajesh for his post giving the solution for 8.6.1. I shamelessly copied the symptom images to save time. However, I was not able to leave him an according message there.

Symptom

I work with PowerCenter 9.1.0 Hotfix 1 and at times my expression and query editors get warped. It looks like this.

Unlike Rajesh I did not experience the right hand side of getting lost which might look like this.

Solution

You can either wipe your regestry completely with the side effect of having to enter repositories and such again.
Or, you fix your registry. I recommend you to back up your registry beforehand. You have to 0 out the positions of the editors and their splitter. Apparently, it is not at the same place in the registry as in 8.6.1 (Rajesh's solution).
Then, it looks like this.

If you backup your fixed registry setting for that spot, you can import it, if it happens again and are done quite easily.
For PowerCenter 9.0.1, you could save the following into a .reg file to import it when ever you want.
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Informatica\PowerMart Client Tools\9.1.0\Designer\Options\Global\Editor\SQL]
"Keywords"="pmkeywd.ini"
"Chroma"=dword:00000001
"Extra word chars"=""
"Comment"="0,0,0"
"Keyword"="0,0,255"
"Quote"="255,0,0"
"SQuote"="255,0,0"
"Default Text"="0,0,0"
"Background"="255,255,255"
"Comment Start 1"=""
"Comment End 1"=""
"Comment Start 2"=""
"Comment End 2"=""
"SQL Editor Font"="Courier New"
"Expression Editor Font"="Courier New"
"SQL Editor Font Script"=dword:00000000
"Expression Editor Font Script"=dword:00000000
"Case"=dword:00000000
"Tab size"=dword:00000008
"Show tabs"=dword:00000000
"Expression Editor Position"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00
"Expression Editor Splitter Position"=hex:00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00
"SQL Editor Position"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"SQL Editor Splitter Position"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00
"Base Editor Position"=hex:98,00,00,00,0f,00,00,00,ec,03,00,00,1b,03,00,00

Donnerstag, 26. Januar 2017

Joiner XYZ must have exactly two inputs.

Symptom

You get the error even if  your mapping joiner has exactly two inputs but at least one of them is a mapplet.

Reason (possible)


I do not know for what reason Informatica made this restriction.
I imagine the OUTPUT transformation to be sort of a virtual transformation, a placeholder as the mapplet transformation is. If you imagine the mapplet in the mapping being replaced by the content of the mapplet (like you can choose in the debugger) WITHOUT the OUTPUT transformation, you end up with more than two inputs for the joiner.

Solution

Create a collector expression as only input to the mapplet output.

Montag, 16. Januar 2017

Uselessness of set variable functions

The setting of the new value of a mapping variable is only at the closing of the session done such that one cannot use mapping variable to provide values between target load groups.
Also, it is not possible to use the mapping variable with the new value later in the same target load group. There, however, you just can forward the port of the set variable function as it returns the new value.

Montag, 2. Januar 2017

Session Log File directory = $PMSessionLogDir/$PMWorkflowName/ and the like do not work

Yeah, you cannot use all built-in variables/parameters for the log file configuration, even though they are known at the time of initialisation and could be set. Why is not clear to me but apparently they are not yet set then.

Montag, 7. November 2016

Load delimited file but from a certain row on, input is garbled

Problem

You load a delimited file but from a certain row on, loaded input is garbled i. e. there seems to be an offset. Possibly this also leads to an crash of the session.

Cause

You probably have at least one text field that contains a line break as its content. The content is within quotes but none the less it does not work. By default (at least up to 9.6) PowerCenter interpretes a line break as the break for a new record no matter what the quoting is.

Solution

There is a custom property called
MatchQuotesPastEndOfLine
If set to
yes
it makes PowerCenter respect quoting of text fields over linebreaks.
You can activate this property either on session level

or as Integration Service property for all sessions at once. For the time being I do not have permissions to the admin console so I cannot provide a screen shot but we did that at my last employer's project.

Sources

Donnerstag, 3. November 2016

Workflow fails to start with "Error in expanding variable parameter"

Symptom

When trying to start a workflow in the workflow manager, you get in the integration service pane at the bottom:
Error in expanding variable parameter Please check the Integration Service log for more information.

Cause

You have a parameter file and tried to do sort of a self assignment like
$PMSourceFileDir=$PMSourceFileDir/some/path

Cure

Programming language usually support such things but PowerCenter parameter do not. Create a work around.