One Star

Fixed Width text o/p

Hi Team,
I am new to talend. I want to have multiple fixed width text file output based on rownumber from an oracle table. What component I need to use? The o/p should be like this
aaa 123 @##
bbb 456 *&^
ccc 780 *^%
ddd 987 $%&
EOF
Please help. Note for the EOF at the end of each text files.
Thanks,
Vishal
11 REPLIES
Moderator

Re: Fixed Width text o/p

Hi,
I want to have multiple fixed width text file output based on rownumber from an oracle table.

For fixed length file, we provide tFileOutputPositional component.
Perhaps the work flow should be: tOracleInput-->tFileOutPutPositional
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Fixed Width text o/p

Hye Sabrina,
Thanks for the reply. But i already tried with outputpositional component. It gives results like
aaa 123 #$% bbb
345 &%# ccc 123
#$% ddd 234
#$@
This is not the exact output that I want. Please help.
Thanks,
Vishal
Moderator

Re: Fixed Width text o/p

Hi,
What your input source? It looks like o/p in oracle?
aaa 123 @##
bbb 456 *&^
ccc 780 *^%
ddd 987 $%&
EOF

How do you set the tFileOutPutPositional component, could you please upload your component setting screenshot into forum?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Fixed Width text o/p

Hye Sabrina,
The input is a table from oracle with fixed length size columns. I want the output also in fixed width text files. I am not sure how to attach a screenshot. I am telling you my tFileOutPutPositional setting. In Basic Setting tab -
Row seperator - "\n"
Formats - Column Size Padding Char Alignment Keep
Name 20 '' Left All
Number 10 '' Left All
Address 28 '' Left All
The thing is, it's taking the column width but it's not taking the row seperator in the output text file. Instead of inserting a new row into new line it's writing in the same line with '?' in between. The output is like
aaa 123 #$%?bbb 345
&%#?ccc 123 #$%?
ddd 234 #$@
I want the output in the below form:
aaa 123 @##
bbb 456 *&^
ccc 780 *^%
ddd 987 $%&
EOF
Thanks
One Star

Re: Fixed Width text o/p

Can anyone please help me on the below issue. It's required on an urgent basis.
Thanks,
Vishal
Five Stars

Re: Fixed Width text o/p

not sure but if you tell me the hex value for '?' this character we can fix this issue. some it should be 0A or 0D or both 0A0D
One Star

Re: Fixed Width text o/p

Sorry for asking this. But how to find out the hex value for that particular character??
Five Stars

Re: Fixed Width text o/p

let it be, i think you can check whether \r\n will work for output test and let me know the result.
One Star

Re: Fixed Width text o/p

Ooo Thanx a lot. The output is coming in fixed width now. But there is still one problem. The last column is not generated in the output text file. Can there be any reason for that?? Previously it was coming. Thanx for the help so far.
One Star

Re: Fixed Width text o/p

Hye it's coming fine now. There was a small error. I fixed it and everything's perfect. Thanks for the help.
Five Stars

Re: Fixed Width text o/p

welcome