Competition: What’s your favorite Redgate tool? Enter now.

Existing Data Source - Specify number of rows

lvdancerdavelvdancerdave Posts: 3
Still new to this tool. When setting up an existing data source for a table, there is the option "Specifiy number of rows by:" with several options, but I am having trouble finding documentation on the behavior of these values. If you select Numeric Value=1000, would you get the first 1000 rows of the source table or a random sampling? How does Proportion of Table work?
David Burt

Comments

  • Eddie DEddie D Posts: 1,688 Rose Gold 5
    Thank you for your forum post.

    You ask an excellent question and our documentation does not have any information on this. To answer your questions:
    If you select Numeric Value=1000, would you get the first 1000 rows of the source table or a random sampling?
    It is my belief that the product would select the first 1000 rows if there are over 1000 rows of data in the table selected as the data source.
    How does Proportion of Table work?

    The tool tip help contains this information:
    If you have selected Proportion of table to define the number of rows to be generated, SQL Data Generator counts the number of rows in the table of reference, and then calculates the specified percentage of this count.

    For example, if your specified table of reference contains 1000 rows, and you specify a percentage value of 75, SQL Data Generator will generate 750 rows for the table that is being populated.

    I believe that the product using the example in the tool tip help would select the first 750 rows of data.

    I will submit a request request to improve the documentation with regards to your questions and obtain confirmation of my answer.

    Many Thanks
    Eddie
    Eddie Davis
    Product Support Engineer
    Redgate Software Ltd
    Email: [email protected]
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello David,

    It looks pretty simple - when you select a potion from another table, it simply selects the top x number of records. If it needs to randomize the results it does so in memory - the SQL Profiler trace clearly shows it's getting the top x from the other table.

    Proportion of table just lets you choose a second (reference) table, counts the number of records from it, and does a percentage on that and selects the top x records from the source table again (where x is the row count from the reference table divided by the percentage you had specified).
  • Eddie DEddie D Posts: 1,688 Rose Gold 5
    Hi David

    I have submitted Feature Request SDG-1046 for the Product Manager and Development Team to consider, for adding additional information to our help documentation. In particular when selecting an existing data source for the Specifying number of rows option and the drop down selections:

    Numeric value
    Proportion of table
    Generation Time
    Same as mapped data

    Many Thanks
    Eddie
    Eddie Davis
    Product Support Engineer
    Redgate Software Ltd
    Email: [email protected]
Sign In or Register to comment.