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
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 |
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 |
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 |
How to display First letter of Names in Caps?
If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, the target should be loaded as 1 a+b+c or 1 a||b||c, what transformations should be used for this?
What are active transformations? Name them.
wtite sql query following table are city gender no chennai male 40 chennai female 35 bangalore male 10 bangalore female 25 mumbai female 15 i want the output? city male female chennai 40 35 bangalore 10 25 mumbai null 15
What are two types of processes that informatica runs the session?
what kind of issue you will get in environment? (we ll call help desk to raise ticket rite?
Work flow failed when it is set to Bulk mode but it was successful when set to normal mode y??(All the connections are fine and exactly correct)?
Quickly characterize reusable change?
Explain direct and indirect flat file loading (source file type) - informatica
Suppose in the next version of Informatica, RTR Xn is excluded. Then how will u route data to different tgts?
If we use only lookup transformation in a mapping ie, SourceQualifier-->Lookup --> Target. , here datas are taking very long time to load in target., so what are steps to improve the performance in that mapping???????
How to create or import flat file definition in to the warehouse designer?