SQL Data Generator 3

Customizing existing generators

You can customize the generators in the following ways:

  • change the settings for each column
  • for generators that use lists, create a custom list of values

Changing the settings

When you select a generator for a column, you can customize the generator by changing the default settings.

For example, in the Personal category, Working Age is pre-configured to have a minimum value of 18 and a maximum value of 65. However, in your company the minimum age may be 21, so you can change this value in Min.

Similarly, if you have selected the Title generator, you may want to add the title Prof. To do this, you can edit the expression in Regular expression. Change:

Mr|((Mrs|Miss|Ms)|Dr)(\.?)

To:

Mr|((Mrs|Miss|Ms)|Dr|Prof)(\.?)

For more information about regular expression generators, see Regexp generator.

This is a good way to customize a generator for an individual column.

Creating custom lists

Some of the generators use lists of values (dictionaries) to supply the data. For example, First Name (Female) uses the list NamesFirstFemale.txt

The lists are located in %ProgramFiles%\Red Gate\SQL Data Generator 3\Config (on 32-bit machines) or %ProgramFiles(x86)%\Red Gate\SQL Data Generator 3\Config (on 64-bit machines).

You can create your own lists by creating a text file with each value on a new line. You can then amend the generator settings so that it uses your file. For example, for First Name (Female), click Browse... to select your file. Alternatively, you can use the generic File List generator.

For generators that use regular expressions such as Full Names, edit the regular expression to specify the name of the new text file.

For more information about regular expression generators, see Regexp generator.

If you will want to use the generator with the custom list again, you can create a new generator that references the custom list file, see Saving a custom generator.

Saving custom generators

If you've customized a generator's settings and you want to reuse those settings for multiple columns, you can save a custom generator:

  1. Select a generator and make the customizations you want.
  2. To the right of the Generator list, click Save As:
  3. Specify a name and description for your generator.
  4. Click Save.
    Your customized generator is saved to the Generator list, in the User Defined category. You can now reuse this generator for any compatible column.

Sharing custom generators

You can share your custom generators with other SQL Data Generator users by storing them in a shared folder (a network share, SkyDrive, or Dropbox, for example):

  1. On the Tools menu, click Application Options.
  2. On the Generation tab, under Shared Folder, browse to the location of the shared folder you want to use.
    SQL Data Generator now saves custom generators to this location.

Other SQL Data Generator users can use the same set of custom generators by setting their shared folder path to the same location.


Didn't find what you were looking for?