Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Suppose we have a csv file with contents as below which is
used has a source file.

C1,C2,C3,C4
100,200,A B,300
200,400,X,Y,299 ---> it should be 4 values but by mistake
300,600,C D,566 with a comma in between X & Y,its 5.

My target takes only 4 columns, How to take care of the 2
record as above without rejecting it and loading in the target.

Hope u guys have understood my scenerio

Answers were Sorted based on User's Feedback



Suppose we have a csv file with contents as below which is used has a source file. C1,C2,C3,C4 ..

Answer / abhinav

I am not sure if the solution I am going to post will
actually work but it is worth a shot:

1. Don't define a delimiter so that the records are read
as '100,200,A B,300' and '200,400,X,Y,299' and so on i.e.
as a single record. This is to ensure that all the records
pass the source-qualifier.

2. Now you have all the records including the faulty one in
SQ. Next, you put an expression where you use REPLACECHAR
to remove all the commas from all the records. Now ALL your
records will of the same length.

3. Next you can use SUBSTR to read the first 3 numbers to
get the first column, next 3 to get the second column and
so on and so forth to get proper data in proper columns.

My explanation might not be clear but I have a hunch that
this might work.

Is This Answer Correct ?    5 Yes 4 No

Suppose we have a csv file with contents as below which is used has a source file. C1,C2,C3,C4 ..

Answer / dj

ou can do this by executing a pre session unix command. Replace consecutive delimiters with some Junk value and later in informatica mapping replace it with null.

Is This Answer Correct ?    0 Yes 0 No

Suppose we have a csv file with contents as below which is used has a source file. C1,C2,C3,C4 ..

Answer / shirishworld2000

Waiting for the response

Is This Answer Correct ?    0 Yes 1 No

Suppose we have a csv file with contents as below which is used has a source file. C1,C2,C3,C4 ..

Answer / naveen

By using replace char function we can write this


Suppose

length(replacechr(c3,'1234567890abcdefghtijklmnopqrstuvwzyz',null))

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Informatica Interview Questions

how can run the wf through pmcmd commend? write script?

2 Answers   Cap Gemini,


how can i invoke pmcmd in command line prompt

1 Answers  


How to prepared lld.can any one tell me detailed explanetion.

0 Answers   Bank Of America,


following scenario empsal table i want who exist one lakshs sal above monthwise? ` empsal empid monthyear sal 1 jan2008 1000 2 march2009 50000 3 april2009 4000 4 feb2009 100000 5 jul2009 600000 6 dec 2008 90000

5 Answers   Wipro,


complex mapping ur project u r invlve can u explain and give real time example give me ?

0 Answers   HGS, TCS,


Where is metadata stored?

0 Answers  


Suppose on 1st Nov 2010 you had created a mapping which includes huge aggregator calculations and it is under process for next two days. You will notice that even on 3rd day also its still calculating. So without changing a logic or changing a mapping How will you troubleshot or to run that mapping? Explain the steps

0 Answers  


Why can't we use few transformations in mapplet ? like xml and target defintions, seq etc ?

2 Answers   IBM,


How You Pull the records on daily basis into your ETL Server.

2 Answers   TCS,


How i can Schdule the Informatica job in "Unix Corn Schduling tool" ?

2 Answers  


what is the difference between lookupoveride and joiner?

3 Answers  


Which is the t/r that builts only single cache memory?

0 Answers  


Categories