top button
Flag Notify
Site Registration

How to find prime numbers in Informatica PowerCenter?

+3 votes
588 views

How to find prime numbers in Informatica PowerCenter?

I tried but it need some loop condition to check.

posted Oct 30, 2014 by Sunil

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

1 Answer

0 votes

Testing primality is not a data integration task, so PowerCenter does not support directly.

You should choose a primality test, implement it in Java (or use an existing library) and then execute it with Java transformation for every source value you need to test.

answer Oct 30, 2014 by Amit Kumar Pandey
Similar Questions
0 votes

I have some files that I would like to consolidate into a single database table. The files have similar but different formats. The files look something like this:

FileOne:
•ColA : string
•ColB : string
•ColC : string

FileTwo:
•ColAA : string
•ColBB : string
•ColCC : string

FileThree:
•Col01 : string
•Col02 : string
•Col03 : string

The destination table looks like this:

TableDestination:
•ColFirst : string
•ColSecond : string
•ColThird : string

I want to develop a mapping that ETLs these three files into this one database, but because the column names are different, it looks like I'll have to develop three different mappings, or three different sources, or three different somethings. The problem is that my example is contrived: I actually have many different files that all have different formats and column names, but the data is all very similar.

I would like to develop a single mapping or workflow that can handle all of this by only adding a table that holds the column mappings. Such a table would look like this based on the sample files and sample table above:

TableMappings:
enter image description here

In this way, to edit a column mapping I only have to make an edit this this TableMappings table. I wouldn't have to make any changes at all to the mapping or workflow. Nor would I have to redeploy an application.

What would a mapping or workflow look like that could take advantage of something like this? I assume there'd be a flat file source that takes files from a folder. There would be something in the middle that uses this TableMappings table to map column names. Finally there would be a relational data object that represents my destination database table "TableDestination". I don't know how to put this together though.

+1 vote

I have a complex XML document that the informatica XML parser struggles with "normalizing", how can I run a XML transformation such as XSLT to simplfy it prior to sending it into the XML parser.

0 votes

I have employee's leaves related data and payment related information. e.g. Employee E1 has taken maternity leave this year. She needs to paid for 6 months and if she is on leave for greater duration (like 8 months) , I need to create two records for her.

One for the allowed duration and the other for extended duration.

Employee  LeaveStartDAte  LeaveEndDate Total_days_taken  Total_days_allowed LeaveType
e1         1Jan2013       31Aug2013     242                 186                 ML

Target expected :

Employee  LeaveStartDAte  LeaveEndDate Leavetype
e1        1Jan2013        30June2013     ML
e1        1July 2013      31Aug2013      Extended ML

How can create the second record dynamically in informatica mapping?

+2 votes

How to find prime numbers between given intervals? Sample code along with the complexity would be helpful?

...