| Author |
Message |
CraigOttley
Joined: 15 Jul 2010 Posts: 13 Location: Newport Pagnell
|
Posted: Fri Dec 17, 2010 11:57 am Post subject: Weighted List Custom Generator |
|
|
Hi!
Has anyone every happened to create a Custom Generator for a weighted list?
I'm struggling to find the right properties I need to set.
So far i've got the following...
| Code: |
<generators>
<generator type="RedGate.SQLDataGenerator.Generators.List.WeightedListGenerator"
name="Yes|No"
description="95 | 5%..."
category="Weighted Lists">
<property name="Seed">0</property>
<property name="NullsAllowed">False</property>
<property name="NullProportion">0.01</property>
<property name="">ListItems</property>
<!--<element>
<key type="string">ListItems</key>
<value version="1" type="WeightedListItems">
<WeightedListOfItems type="WeightedListOfItems" version="1">
<value version="1" type="WeightedListItem">
<Name>Yes</Name>
<Weight>95</Weight>
</value>
<value version="1" type="WeightedListItem">
<Name>No</Name>
<Weight>5</Weight>
</value>
</WeightedListOfItems>
</value>
</element>-->
<matches field="*Option*" score="70"/>
<type type="string"/>
</generator>
</generators> |
|
|
| Back to top |
|
 |
Linda Hawksworth
Joined: 25 Jun 2007 Posts: 192
|
Posted: Wed Jan 12, 2011 1:40 pm Post subject: |
|
|
| I have sent you a PM with some amended code. |
|
| Back to top |
|
 |
CraigOttley
Joined: 15 Jul 2010 Posts: 13 Location: Newport Pagnell
|
Posted: Tue Jan 18, 2011 2:39 pm Post subject: |
|
|
Thanks Linda.
For everyone else this code works for me )
| Code: |
<generators>
<generator type="RedGate.SQLDataGenerator.Generators.List.WeightedListGenerator"
name="Yes|No"
description="95 | 5%..."
category="Weighted Lists">
<property name="Seed">0</property>
<property name="NullsAllowed">False</property>
<property name="NullProportion">0.01</property>
<property name="ListItems">
<WeightedListOfItems type="WeightedListOfItems" version="1">
<value version="1" type="WeightedListItem">
<Name>Yes</Name>
<Weight>95</Weight>
</value>
<value version="1" type="WeightedListItem">
<Name>No</Name>
<Weight>5</Weight>
</value>
</WeightedListOfItems>
</property>
<matches field="*Option*" score="70"/>
<type type="Object"/>
<type sqlType="Char"/>
<type sqlType="Varchar"/>
<type sqlType="NChar"/>
<type sqlType="NVarchar"/>
<type sqlType="NText"/>
</generator>
</generators> |
|
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group