on 07-16-2007 4:03 PM
I'm having problems with a Message Mapping that requires me to take the values from the first line in a CSV and the last line to calculate other values...
The source message type in my mapping is as follow
<MT_Message>
<Header> 1..1
<ID>
<StartDate>
<EndDate>
<Records> 1...unbounded
<Interval>
<Number>
I need to take the first row/occurence of Records and use this to calculate the Startime. I also need to take the last occurence of Records to calculate the stop time
This is my CSV file content
H FORECASTS 20080101 20081231 17568
D 20080101 1 1 66.29283
D 20080101 1 2 61.1344
D 20080101 2 1 61.1344
In this case I need to take the values 1 1 for the StartTime and 2 1 for the StopTime.
How can this be done?
Damien,
Do u have problem with mapping or content conversion. According to my understanding the problem is with content coversion. U can't take the first and last values in CSV file. Probably u can import all the values and during mapping u can seggregate the required structure alone.
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To solves this I removed the context and sorted the queue as the last value in the file will always be the latest Date and Time.
This isn't a solution to your problem but it worked for me!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help. I imported the contents into an array and used the last values in the array
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Damien,
Yes you can do this, use a java program to slurp the entire file in then sort it using string comparators`s...let me know if you need further details.
Regards
Ravi Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.