Reputation: 57
I am creating a dynamic name flat file in informatica powercenter. I have to accomplish two tasks: create a flat file with timestamp appended to it's name, and also append a trailer having the record count to the flat file. I am able to perform the above two tasks separately but i am not sure how i can accomplish them together. If i create a flat file with timestamp info using informatica file name port and use a unix script in a command task to append the trailer how can i refer to the variable file name in my unix script. I am using the following command to refer to the output file name generated by informatica:
file='ls output_file.txt'
here the name of output file is not variable. I wanted to know how can i call an output file with a variable name in this command or the script itself.Any help is appreciated.
Thanks
Upvotes: 0
Views: 3369
Reputation: 905
Here is my approach
I added the PERSON_ID to add another ID unique identifier but its an option
Upvotes: 0
Reputation: 3353
Try this:
Assignment Task
and assign the desired name to the variable, e.g. 'output_file_' || TO_CHAR(SYSTIMESTAMP(), 'YYYYMMDDHHMISS') || '.txt'
wc -l < $$TargetFileName >> $$TargetFileName
) to add the line count to the output file.Upvotes: 0