Issue in capturing string by positions in transformer stage
Posted: Wed Dec 02, 2015 11:54 am
Hi,
I have a requirement while loading the file.
The below file is semicolon delimiter & Double quote for character fields.
I/p:
1000;12-11-2000;"";"ASDDIK";"R"
1001;12-12-2001;"";""TOMI"" ";"R"
1002;01-01-1982;"";"";""
1003;12-12-2001;"";"AYEHHE;JDJUE";"";"R"
Actual O/P:
1000;12-11-2000;;ASDDIK;;R
1001;12-12-2001;;""TOMI"" ;R
1002;01-01-1982;;;
1003;12-12-2001;;AYEHHE;JDJUE;;R
Present O/P:
1000;12-11-2000;;ASDDIK;;R
1001;12-12-2001;;""TOMI"" ;R;""TOMI"" ;R
1002;01-01-1982;;;;;
1003;12-12-2001;;AYEHHE;JDJUE;;RAYEHHE;JDJUE;;R
job Design:
Sequential file-->Tranformer stage(3outputs for 4th,5th and 6th delimeters)--->funnel--->Oracle Connector
Description: In sequential file, i am reading file as single column because the data has more delimiters. In transformer stage i am using staging variables for free text field(4th field) and taking the string between the delimter but it is working only for 1st row not for all the rows.
Datatype is Varchar2
stg1: Index(DSlink1.001,';',3)+2
stg2: Index(DSlink1.001,';',4)-1
in derivation field: DSlink1.001[stg1,stg2]
From second record i am not able see the desired output.
Index functions are working fine.
Can you please let me know any suggestions for this issue.
I have a requirement while loading the file.
The below file is semicolon delimiter & Double quote for character fields.
I/p:
1000;12-11-2000;"";"ASDDIK";"R"
1001;12-12-2001;"";""TOMI"" ";"R"
1002;01-01-1982;"";"";""
1003;12-12-2001;"";"AYEHHE;JDJUE";"";"R"
Actual O/P:
1000;12-11-2000;;ASDDIK;;R
1001;12-12-2001;;""TOMI"" ;R
1002;01-01-1982;;;
1003;12-12-2001;;AYEHHE;JDJUE;;R
Present O/P:
1000;12-11-2000;;ASDDIK;;R
1001;12-12-2001;;""TOMI"" ;R;""TOMI"" ;R
1002;01-01-1982;;;;;
1003;12-12-2001;;AYEHHE;JDJUE;;RAYEHHE;JDJUE;;R
job Design:
Sequential file-->Tranformer stage(3outputs for 4th,5th and 6th delimeters)--->funnel--->Oracle Connector
Description: In sequential file, i am reading file as single column because the data has more delimiters. In transformer stage i am using staging variables for free text field(4th field) and taking the string between the delimter but it is working only for 1st row not for all the rows.
Datatype is Varchar2
stg1: Index(DSlink1.001,';',3)+2
stg2: Index(DSlink1.001,';',4)-1
in derivation field: DSlink1.001[stg1,stg2]
From second record i am not able see the desired output.
Index functions are working fine.
Can you please let me know any suggestions for this issue.