on 09-25-2008 5:36 PM
Hi
We are trying to load a flat file into a cube.
In one of the fields, we have description that sometimes exceeds 60 characterers (say, 65 characters).
When we load the flat file, instead of truncating it, it puts an " to the description and puts the last 5 characters in the next column.
Is there any way to handle this?
Thanks
Hi Satya,
No need to keep any seperators in the file. You can load the file in the existing format with a simple solution.
Ex:
You have to load a Description which is of length 150.
Create 4 InfoObjects DESC, DESC1, DESC2 3each 60 length.
In the communication Structure, use 3 Info Objects where only One InfoObject in the Transfer Structure.
Comm Structure:
NUMBER(10)
DESC1(60)
DESC2(60)
DESC3(60)
Tran Structure:
NUMBER(10)
DESC(150)
(Though the maximum length of an InfoObject is 60, you can manually change it upto 255 in the Transfer Structure)
In the Transfer Rules, use the update type as "Routine" for each InfoObject (Desc1, Desc2 & Desc3) as following.
DESC1:
RESULT = TRAN_STRUCTURE-DESC(60)
DESC2:
RESULT = TRAN_STRUCTURE-DESC+60(60)
DESC3:
RESULT = TRAN_STRUCTURE-DESC+120(30)
Hope this will help you out.
Regards,
Shashi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satya
To me, the best approach to take (If possible) would be to use a delimited file. I understand it's not the only solution but to my point of view, the most clean one since what if your description happens in the future to be 400 Characters, even though you defined 4 fields of 60 Char, you will still have the exact problem.
Again, it depends if you have control over the create of this flat file, if so, it would fix your problem right away.
Regards,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create 2 info objects and place the first 60 characters in the first info object, then the next 60(?) in the second info object.
You should also delimit the file with a semi-colon or tab or comma ... it sounds like you may be using fixed width.
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.