Options

Multiple loads for same project

AndrewBAAndrewBA Posts: 17
Hello!

I have a requirement to gradually fill a database with data, the scenario would be;

a) Load x thousand rows of data into the db
b) Test the application
c) Repeat until we break something

As far as I can see, SQL Data Generator is not aware of the data in the target table or of what it loaded last time round, so running the same project against the same target db repeatedly will violate primary key or unique constraints?

The only way I've come up with of doing this is to have multiple SQL Data Generator projects which are identical except for the amount of rows that they load. For example project 1 would delete all data and then load x thousand rows, project 2 would delete all data and then load 2x thousand rows, project 3 would delete all data and then load 3x thousand rows, etc.

Is there any better way of doing this? There's an overhead with keeping multiple SQL Data Generator projects in sync as we continue to refine them.

Comments

  • Options
    Eddie DEddie D Posts: 1,781 Rose Gold 5
    Thank you for your post into the forum.

    You are correct that SQL Data Generator is not aware of the current data in the table. However, there is no need to load several Data Generator projects.

    If I have understood you correctly, you wish make several tests loading 1000 rows of then increasing to 2000 then to 3000.

    There is an option which by default is enabled, 'Delete data from table before generation'. You will see this option immediately underneath where you specify the number of rows to be generate.

    So you load the single or create a new SQL Data Generator project. Load 1000 rows of data, by default Data Generator will select 50 rows. Generator the data.

    Repeat the data generation specifying 2000 rows and ensure that the 'Delete data from table before generation' option is checked or enabled.

    I hope this answers your question.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Options
    Thanks for the response Eddie.

    I had already considered your solution, which means editing the 'Number of rows to generate' for every table in my database every time I want to complete a load. To reduce this overhead I thought that I'd save each configuration as a separate project but then of course I've got to keep all my projects in sync if I make refinements.

    I was wondering if I could create one SQL Data Generator project and use it multiple times on the same database without editing the SQL Data Generator project and without breaking any primary keys or unique constraints?

    I suspect that I'm asking for functionality beyond that which should be expected of a v1 release. Either way, SQL Data Generator is a great application and has already proved useful in my organisation. Keep up the good work!
  • Options
    Eddie DEddie D Posts: 1,781 Rose Gold 5
    Thank you for your reply.

    Hopefully the following information may provide some more help to you.

    You can alter the Seed in the Column Generation settings. In the 'Tables to populate' list down the left hand side, you can expand each table to see the columns that make the table.

    Select a column so that it highlights in yellow and the Column generation settings will be displayed

    By default, every column has a different seed. The seed for the first generated column of the first table in the Tables to populate list is 0; for each subsequent generated column in that table, the seed is increased by 1. For the second table, the seed value starts at 1025, and so on.

    You can alter the seed value and generate values that are shuffled, to produce a different set of results.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.