What's the best approach to parse out the sequential file name to be used
as a variable inside Transformer Stage ? For our project, file name is a
unique ID that will be used within jobs to populate our target table.
Am I correct in thinking that I may have to use Job Sequence to execute
linux command (Execute Command Stage) to parse out the file name and
pass in as a variable ? Or is there a simpler alternative to accomplish the
same thing.
Thanks!
Sequential File Stage and file name variable
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 13
- Joined: Wed Apr 07, 2010 11:50 pm
-
- Premium Member
- Posts: 13
- Joined: Wed Apr 07, 2010 11:50 pm
Not enough information for a cogent answer. How are you reading the files now - with a file pattern? Is that why you don't know the actual filename run to run? I'm assuming that, otherwise as others have noted you'd just use the job parameter that was passing it in.
There's an option in the Sequential File stage to add a column populated with the actual filename found. Don't recall exactly and can't check but should be easy enough to find. That would give you the filename in a new column as part of each record passing through the job.
And if it doesn't work as expected, check posts like this.
There's an option in the Sequential File stage to add a column populated with the actual filename found. Don't recall exactly and can't check but should be easy enough to find. That would give you the filename in a new column as part of each record passing through the job.
And if it doesn't work as expected, check posts like this.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 13
- Joined: Wed Apr 07, 2010 11:50 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
Field(InLink.FileNameColumn, "/", Count(InLink.FileNameColumn, "/") + 1, 1)
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.
-
- Premium Member
- Posts: 13
- Joined: Wed Apr 07, 2010 11:50 pm