This recipe demonstrates how to generate random fruit sales information using random datasource.
Steps taken:
Create a random datasource (FruitSalesGenerator.ds). Set Count to 200.
Add the following columns into the “Define Random Datasource” page:
Column 1 Name=CompanyName, Data Type=String, Value Type=Expression, Values=Trinity, Diamond Fruit, Mountain View, TBSO, Bristol Fruit, Riverside, Rainier
Column 2 Name=Fruit, Data Type=String, Value Type=Expression, Values=Apple, Banana, Cherry, Grape, Kiwi, Lemon, Orange, Peach,Plum, Strawberry
Column 3 Name=Date, Data Type=Date, Value Type=Expression, Range from 2001-01-01 to 2005-12-31
Column 4 Name=Quantity, Data Type=Integer, Value Type=Expression, Range from 1 to 20
Column 5 Name=Price, Data Type=Float, Value Type=Expression, Range from 5.00 to 120.00
Column 6 Name=SequenceNumber, Data Type=Integer, Value Type=Expression, Auto-Increment Start=1, Step=1
Column 7 Name=Month, Data Type=Date, Value Type=Expression, Auto-Increment Start=2008-01-01, Step=1
The output will display 200 lines of random fruit sales information.
To download the necessary files for this recipe, refer to the attached ZIP package.
RandomFruitSalesGenerator.zip