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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

in reporting we add some new objects,how we get the count of the newly added objects to the report

2200


What are the guidelines to be followed while using union transformation?

1146


What is source qualifier transformation in informatica?

1014


What is a grid in Informatica?

1072


What is the difference between Active and Passive transformation?

1154


What is workflow monitor?

1063


What is the main purpose of Unconnected lookup other than updating slowly changing dimensions? or In which case u use Unconnected lookup?

7456


Scheduling properties,whats the default (sequential)

1960


What is a joiner transformation and why it is an active one?

1085


What is aggregate cache in aggregator transformation?

1148


What do you mean by enterprise data warehousing?

1066


Can we change Dynamic to Static or Persistent cache? If so what happens?

2213


What do mean by local and global repository?

1227


What is DR strategy for Informatica project?

1191


What are the different transaction levels available in transaction control transformation?

1210