0

anyone know how to set variable for file name in 'Text File Input'? I want the file name depends on when I execute the transformation, example:

D:\input_file_<variable>.txt

today = D:\input_file_20131128.txt
tomorrow = D:\input_file_20131129.txt

FYI, I'm using Kettle Spoon - 4.2.0

Codek
  • 5,114
  • 3
  • 24
  • 38
BimoS
  • 129
  • 4
  • 14
  • can you say what and all step you used? i want to see your transformation. – Helping Hand.. Nov 29 '13 at 07:51
  • this is the simple example. only upload text file to db. you can download at https://drive.google.com/file/d/0B2DhJg42FPwWS1VMaHlOc3JfajA/edit?usp=sharing – BimoS Nov 29 '13 at 17:00

1 Answers1

2

In set form, you can use variable as ${Variable_Name} in file name.

You should notice the system information:

Please remember that the variables you define with this step can't be used in this transformation. This is simply because all steps in a transformation run in parallel without a certain order of execution.

As alternative correct usage, you can set variables you want to use in the first transformation of a job

Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
Thai Heng
  • 152
  • 1
  • 11