Using a weighted list in place of a FK.
Mij
Posts: 23 Bronze 1
Sometimes my FK is just a numbered list in a reference table. I wish sometimes to replace the FK with a weighted list so that it will be more realistic. It seems like sometimes the weighted list doesn't work, I end up with equal values of the FK instead of the weighted list. Additional: often when I am filling out the generator options for a column, every time I change an option, I have to wait for the generator to run and come back to allow me to make another change. Is there any way that I can change all my column generator options and then have the generator run?
Tagged:
Best Answer
-
Jessica R Posts: 1,319 Rose Gold 4Thanks @Mij!
Using these settings appear to work alright from a quick test, as the generated rows end up with about 70% of 1s and 30% of 2s. I think the percentage may likely look off because the preview is only showing the top 200 rows.
If you increase the amount shown in the preview, does it look more like a 70/30 split? (The preview can only show up to 1000 rows though, I'm afraid.)
Answers
Hi @Mij!
You can stop the generator from running immediately by going to Edit Project>Options and unticking 'Auto generate previews'. (Then after each change, you'll be prompted to click the preview area before it will re-generate the preview.)
Regarding the weighted generator giving equal weight to the values, I'd like to try to reproduce this locally. Can you kindly let us know more detail like the column type, and the weight ratios used?
Thank you!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
- What version of SQL Data Generator you are using?
- How many rows are you generating?
- How many rows are shown in the preview? (Tools>Application options>General>Number of rows in generator preview)
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?