Tuesday 16 August 2016

Generating a sequence of Months using tMap and tjavarow


             


               tRowGenerator is mostly used for creating dummy data which is used for test purposes. tRowGenerator can also be used to generate some random records. 
        Go to schema definition and enter the required columns. We have to compulsorily give the function definition. Here, we are selecting the function as Numeric.sequence where it can generate a series of numbers.
           





                         In function parameters, we have to give the sequence identifier, start value and step. 






                   In the tMap expresssion builder, the following condition can be given to display 12 months. Notice that the string values are given inside the double quotes. The given condition is based on conditional operator which will be discussed later in another post separately. 




                   This produces the following output, 








Generating Months using tJavaRow




                The same months can be generated by the following code in tJavaRow component that uses simple if, else if, else statements. The output to be produced must be given inside the curly braces / brackets. 




This produces the following output,


------------------------------------------Thank you very much----------------------------------------------




No comments:

Post a Comment