Weigthed list generator - maximum weight

The simplest way to populate your database with test data.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Michelle Taylor, Lionel, Emma A, sherr

Weigthed list generator - maximum weight

Postby HugoKornelis » Fri Aug 02, 2013 10:57 pm

Hi all,

I'm trying to use SQL Data Generator (version to generate extra data for the FactResellerSales table in the AdventureWorksDW2012 sample database. But in order to make it match the pattern of the rest, I find that some features are missing from Data Generator.

One of them is for generating the RevisionNumber. In the existing data, this number is typically 1 (about 99.9%), and sometimes 2 (about 0.1%). I wanted to expand a bit on that, by adding an even smaller number (0.001%) of 3's. So I used the Weighted list generator, entered the values 1, 2, and 3, and tried to set the weights to 99899, 100, and 1.

To my surprise, the value 99899 was simply changed to 10000. Is this a bug, or is this a design choice?

This is not a big issue to me. I decided to go with the flow and use weights of 10000, 100, and 1 - no biggie. But I am wondering why I am not allowed to use a higher weight?

Thanks in advance! ;)

EDIT: After posting, I realized that there is a workaround for values that are not too far above 10,000 - for instance, to get a weight of 15,000, simply add the same value twice, with weights 10,000 and 5,000. But for really big values, that workaround is not practical.
Hugo Kornelis
(SQL Server MVP and Friend of Red Gate)
Posts: 5
Joined: Wed Mar 25, 2009 10:48 am

Postby james.billings » Mon Aug 05, 2013 3:47 pm

Thanks for your post.

I'm not entirely sure why that maximum value is what it is- I guess it's just one of those design-time decisions that never changed.

We already have a bug logged around some other areas of the weighted list generator, so I've added a note of this forum post to that for reference (SDG-629)
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Return to SQL Data Generator 2

Who is online

Users browsing this forum: No registered users and 0 guests