Page 1 of 1

Generate Multiple Files - How to remove the "key"

Posted: Fri Dec 09, 2016 5:53 am
by fabiosantos
Hi,

I'm using a SF configureted to Generate Multiple Files.

I'm getting generate files name as expected, but, the "key" field cannot follow into the files.

How to remove the "key" from output file content?

Posted: Fri Dec 09, 2016 6:47 am
by atul9806
Use a after job subroutine to rename the files, Can you explain your stage configuration?

Posted: Fri Dec 09, 2016 7:19 am
by fabiosantos
The job is very simple:

Oracle Source... ->> Transformer... ->> Sequential File

Into the source, the query retrieve the emp.ID used as "key" to build the FileName. The query can retrieve several emp.ID's and can be generated more than one file in the same execution.

The SF is configurated as:

- Write Method = Generate Multiple Files
- Key = emp.ID
-- Use value in File Name = TRUE
- Root File String = /tmp/

Using this config, the file name is ok, but the field used as "key" was included also into file content.

With this approach I need to remove this column from file.

Also, I've already to use sed, awk and cut, on SF Filter Condition, but the Job appears keep in loop and not finish.

Posted: Fri Dec 09, 2016 10:45 am
by asorrell
Yup - we had the same problem. When we put it in a filter it would get stuck and the job would hang.

We stopped using the filter and used the cut command in a script we execute with a post-job Exec-SH. Works like a champ.