top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Informatica - replace characters in target

+6 votes
773 views

Im working in a project which we create hundreds of xml's in informatica everyday, and all the data which is in the xml should be filtered, like removing all kind of special characters like * +.. You get the idea.

Adding regular expressions for every port is too complicated and not possible due the large amount of mapping we have.

I've added a custom property to the session XMLAnyTypeToString=Yes; and now i get some of the characters instead of &abcd, in their usual presentation (" + , ..).

I'm hoping for some custom property or change in XML target to remove these characters completely. any idea?

posted Feb 3, 2014 by Abhay Kulkarni

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

You can make use of String.replaceAll method:

String   replaceAll(String regex, String replacement) 

Replaces each substring of this string that matches the given regular expression with the given replacement.

You can create a set of symbols you want to remove using regex, for example:

[*+"#$%&\(",.\)]

and then apply it to your string:

String myString = "this contains **symbols** like these $#%#$%";
String cleanedString = myString.replaceAll("[*+"#$%&]", "");

now you "cleanedString" is free of the symbols you've chosen.

answer Jun 12, 2014 by Shatark Bajpai
Similar Questions
+2 votes

I m working in a project which we create hundreds of xml's in informatica everyday, and all the data which is in the xml should be filtered, like removing all kind of special characters like * +.. You get the idea.

Adding regular expressions for every port is too complicated and not possible due the large amount of mapping we have.

I've added a custom property to the session XMLAnyTypeToString=Yes; and now i get some of the characters instead of &abcd, in their usual presentation (" + , ..).

I'm hoping for some custom property or change in XML target to remove these characters completely. any idea?

+2 votes

How can we update a record in target table without using Update strategy?

+6 votes

I have this query say

Select A, B from Language.Alphabet

Where Language is my Schema Name, this query is used in Informatica Source Qualifier. This query is in Dev at this point so as I go to QA and Prod, the schema name needs to be changed, so rather than going to the query all the time I would like to change the schema name from our scheduling tool DAC.

I tried to parametrize this in Informatica by creating a parameter file and placing it on Informatica server, I get the desired results from this but only if I execute the workflow from Workflow Monitor and not from DAC, but I want it to be done from DAC.

+5 votes

I want to extract the number(0-9) from the string. e.g. if src is *Ax456*&56 then dst should be 45656.

...