As mentioned in this previous post, I've created a Parallel job that can write to multiple files based on job parameters of brand and country, resulting in multiple files with a filename of <country>_<brand>.csv
It seems I'm very close to having the solution, I just need to determine how to have the loop construct in the Sequence job accept the country and brand values from a SQL query. Those values will vary after each monthly run, so the simplest approach is to execute a select distinct on the data results table. The part I'm having trouble figuring out is how to get those values passed along to the loop construct.
I know it was suggested to use a Server job in prior posts, just wondering if there's a simple approach to getting the loop construct to recognize values coming in from a SQL query.
Thanks!
-Russ
Sequence job start loop from SQL result
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Write the output to a file. Use an Execute Command activity to read the file and translate the line terminators to delimiters such as commas that the StartLoop activity can use. Ideally strip the final (empty) line too in the Execute Command activity. The command output becomes the delimited string that the StartLoop activity uses.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thanks Craig -- I took a look at your related topic, and I may try that approach as well. I ended up writing all of the output to a single file, then breaking out to a shell script using sed and awk to split that file into pieces. When I get some time to revisit this solution though, I'll try the more DataStage-centric approach!