Hi All,
I have to split up my input record in to 4 columns.
My Input Seq file has a single column.
Input data is:
1234abcd9089qwer
0989mnop0909sdfg
My O/p file needs four columns, Expected o/p data is:
col1 -1234
col2 -abcd
col3 -9089
col4 -qwer
How shall i achieve this through the column import stage for the fixedwidth record.
Thanks,
SenthilP
Column Import For Fixed Width File
Moderators: chulett, rschirm, roy
Declare the 4 output fixed columns and make the file format with fixed width & no column separators.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
HI ArndW,
Thanks for your reply,
I tried it, The columns are splitted but the values are not proper.
for my given input: 1234qwer0989lkjh
The output column values are:
col1-1234
col2-0989
col3-
col4-
There is no value for col3 and col4. also col2 value is wrong.
Why the output is coming like this, i have all my output datatype as Varchar. For my single input field also i have given as varchar.
Please help me,
Thanks,
Senthil P
Thanks for your reply,
I tried it, The columns are splitted but the values are not proper.
for my given input: 1234qwer0989lkjh
The output column values are:
col1-1234
col2-0989
col3-
col4-
There is no value for col3 and col4. also col2 value is wrong.
Why the output is coming like this, i have all my output datatype as Varchar. For my single input field also i have given as varchar.
Please help me,
Thanks,
Senthil P
Hi,
I tried giving char to my field types, even then i dint get the output.
In col Import stage, i set Record length is Fixed and no field defaults.
For My input seq file, I set the Record length as fixed.
If i change my datatypes to char, it says that" White space Delimiter is missing at offset 4". But i never set any delimiter anywhere.
Please help to resolve this issue,
Thanks,
Senthil P
I tried giving char to my field types, even then i dint get the output.
In col Import stage, i set Record length is Fixed and no field defaults.
For My input seq file, I set the Record length as fixed.
If i change my datatypes to char, it says that" White space Delimiter is missing at offset 4". But i never set any delimiter anywhere.
Please help to resolve this issue,
Thanks,
Senthil P
Using "Char" was a necessary first step. It looks like you have specified delimiters in the column import file definitions, though.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I havent specified the delimiter anywhere, but when i use the char as my datatype for both the Input and output columns of Column import i am getting this error. "Field "col1" lacks whitespace delimiter, at offset: 4 "
Will Column Import surely work for fixed with file?
Please let me know,
Thanks,
senthil P
Will Column Import surely work for fixed with file?
Please let me know,
Thanks,
senthil P