Transformation Design & how the flow of rows will be with steps
1) Drag and drop "Get File Names" step from "Input" category.
2) Browse for the folder location where you kept the files & click on "Add" button . Use .* [dot with star] wildcard to get all the files.

4) Preview the step

5)

* Drag & drop "Filter rows" step from "Flow" category & give below condition to get what type of files you want to pick from the folder ( folder may contain different types files. for ex : .txt, .docx , .csv and etc.

* Make hop connection from "Get File Inputs" to "Filter rows"

Condition to fetch txt file (text type files) from the folder (In this example I kept only txt files but there could be another type of files also in the folder)

* Target email in this example is : test4mail4kettle@gmail.com
* If you want to sent to multiple emails use space to add more emails.
* Sender address in this example is : test4mail4kettle@gmail.com* Sender name is : Test Sender

l Arguments can be handled at the time of execution of transformation or job.

l In Transformation : At “Execute a Transformation” dialogue window

l Job : At “Excute a Job” dialogue window.

3) Example : With Transformation

Scenario : Store argument values(Strings or numbers) in a text file

1) Take a new Transformation(Ctrl+N) save it as 1_CommandLineArgumentsBasic.ktr

2) Drag and drop “Get System Info” step from “Input” category.

3) Double click on it get it properties window as shown in below image and Type 3 filed names

as Arg1,Arg2 and Arg3 and give type as command line argument1 and 2 and 3.

4) Take a “Text output file” from “Output” category and connect it from “Get Sys Info” step.

5) Give file path= E:\Explore\Kettle and file name =CommanLineArgumentsOutput and say its type = text .. Go to “Fields” tab and click on “Get Fields” button to get the fields coming from “Get System Info” step.

Execution of transformation

We will see 2 types of executions

1) Execution from GUI &

2) Execution from command line

Execution from GUI

a) Save the transformation and click on Run button to get it “Execute a transformation window”

b) In the arguments tab provide 3 arguments as shown in image

c) Now check whether the file is generated with the provided input or not at E:\Explore\Kettle

Execution from command line

1) Open command prompt and navigate to the folder where you can find pan.bat file

( remember to work with transformation on command we need pan.bat file).

2) For example : In my local environment kettle is installed in below location.

Thursday, 5 February 2015

In this post, we will see how to customize date input control for default value & for it's format.

Thank you Sam Kumar( A community guy) for asking me to explore this and hope this solution might be useful in your project.

Though, there is a direct property of setting format for date in Date selector , that will not work when you set a default value for date type parameter.

Scenario :

Lets say you have given "yesterday" as default value for date parameter and in Date selector if you give "dd-M-yy" format then you can able to see the selected date in that format BUT for the first time you will not find anything in Date selector because your default parameter value is "yesterday"

Step by Step Screenshot solution :

2) Creating Date parameter : parameter name = date_param
Go to components -> Click on Generic from left side -> Click on Date parameter
Give default value as "yesterday" ( or today or other from the drop down).

6) Save the dashboard and test it : Test -2

parameter default value is : yesterday

NOTES :

1) From the stack overflow link below , as the CDE is already integrated with jQuery technology we have to use formatDate function for formatting the date. 2) The code should go in Post Execution section. 3) render_date_picker ----> render_ is the keyword for which we attach Date input component name. 4) Code is independent for specific date control as it is going into Date input component's own Post Execution section. for example : I have taken another date component and tested..