Controlling the distribution of generated data

ranjeetranjeet Posts: 4
HI
Is there any means by which we can control the distribution of generated test data.

i.e I have a 'VISIT' table with a column name 'VISIT TYPE' [with any one of three types of input data 'Inpatient','Outpatient' or 'Emergency'], so i would like to generate the data in such a manner that 60% of the generated data should be 'Inpatient', 20% should be 'Outpatient' and 20% should be 'Emergency'.[If we are generating 100 rows for visit table then 'VisitType' column should contain 60-Inpatient , 20-Outpatient,20-Emergency data rows]

Regards,
Ranjeet

Comments

  • There is a "weighted list" generator under "Generics" that may do what you want.

    You could add the values as:

    Inpatient 6
    Outpatient 2
    Emergency 2
    Systems Software Engineer

    Redgate Software

  • Hi
    Thanks for the reply.I tried to generate the data with the "Weighted List" as you mentioned.But it is not generating exact number of rows

    for eg: When I tried to generate 100 rows .it will generate 55 -Inpatient,25-Outpatient and 15-Emergency.
    If i generate only 10 rows then it will generate 7-Inpatient , 3-Outpatient and it will not generate any Emergency values.


    Regards,
    Ranjeet.
  • You could try specifying the figures as percentages - i.e. 60,20,20. Does that help? If not, I'll probably need to raise a bug for it not working quite correctly.
    Systems Software Engineer

    Redgate Software

  • Hi
    I tried with 60%,20%,20% and it is generating 'Inpatient-55','Outpatient-25'and 'Emergency-20' and my seed value is 3068.If you need any info please let me know.

    Regards,
    Ranjeet
  • I've tested this out some more and it does seem to be not working correctly.

    I've raised a bug (SDG-945) for this to get looked at; although I'm not sure when this will be unfortunately.
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.