How to populate filename to column name in the table
Moderators: chulett, rschirm, roy
How to populate filename to column name in the table
Hi Floks,
I have a requirement, my source is sequential files and they want to populate filename to target table one of the column.
Provide me some logic to fulfill this requirement.
Request you to please help me to slove this issue.
Thanks
Sree
I have a requirement, my source is sequential files and they want to populate filename to target table one of the column.
Provide me some logic to fulfill this requirement.
Request you to please help me to slove this issue.
Thanks
Sree
Re: How to populate filename to column name in the table
Try with APT_IMPORT_PATTERN_USES_FILESET.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Make the file name a job parameter. Use that parameter in the Sequential File stage. Populate the "FileName" output column of a Transformer stage using the same job parameter. Of course, this only works for a single file, but you can use a sequence to loop through a set of file names.
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.
I am not aware that variable is not for Server jobs. I am sorry for that; but did you try to add that variable in the job level and make the default value to 1?
Just interested to see what is a happening?
Just interested to see what is a happening?
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Any environment variable with APT_ at the beginning of its name applies to the Orchestrate engine (and therefore to parallel jobs only). The same goes for environment variables whose name begins with OSH_.
APT comes from "Applied Parallel Technologies", the name of the company that invented the parallel engine technology before they became Torrent Systems, which was acquired by Ascential Software in about 2003.
APT comes from "Applied Parallel Technologies", the name of the company that invented the parallel engine technology before they became Torrent Systems, which was acquired by Ascential Software in about 2003.
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.
File_name issue is not resolved.
Thanks every, still my issues is not resolved.
Is any other way to finish this task.
Is any other way to finish this task.
Re: How to populate filename to column name in the table
How you are going to get the file names?
OR
Every day set of files will be placed in the folder and need to load that?
Is that all the files to the same table / different tables?
So lot of questions behind this!
Though, there are different ways to handle this!
You can use Sequence / routine to achieve this.
You can search for server routine loop / basic code loop and use that to achieve that.
If you are not good with routine, then go for sequence.
You can use the Unix commands to find out how many jobs you are going to use to run? That count can be the loop counter.
What you have tried so far?
What is your approach?
share with us. Some one will fine tune / correct it
OR
Every day set of files will be placed in the folder and need to load that?
Is that all the files to the same table / different tables?
So lot of questions behind this!
Though, there are different ways to handle this!
You can use Sequence / routine to achieve this.
You can search for server routine loop / basic code loop and use that to achieve that.
If you are not good with routine, then go for sequence.
Code: Select all
1)cmd activity stage-->2)StartLoop-->3)GetFileName-->4)JobToLoadData-->5)EndLoop
What you have tried so far?
What is your approach?
share with us. Some one will fine tune / correct it
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Re: How to populate filename to column name in the table
chulett
-Sorry for not providing full description.
SURA
- Yes, they are posting total files along with trigger file in one folder ,based on the module.
And i am trying with your logic, and update the status.
Ray -Thanks for your clarification and Thanks every one.
Regards,
Sree
-Sorry for not providing full description.
SURA
- Yes, they are posting total files along with trigger file in one folder ,based on the module.
And i am trying with your logic, and update the status.
Ray -Thanks for your clarification and Thanks every one.
Regards,
Sree