본문 바로가기
Open Sources/ETC

Datagenerator - dbMonster Data Type

by 화뉘 2013. 3. 5.

Datagenerator Data Type
String generator
Name : String Generator
Full type name : pl.kernelpanic.dbmonster.generator.StringGenerator
SQL types : char, varchar, text
Description : String generator is used to produce a random string. As a base for generating words it uses an ispell dictionary so the distribution of vowels and consonants is quite similar to english language (although the output text itself is far from that).
Properties
minLength  The minimal length of output string. [default: 0] 
maxLength  The maximul length of output string. The maximum length is limited by the size of Java type of Integer. [default: 255] 
allowSpaces  A boolean value that may be used to cause a StringGenerator not to use any spaces. It is useful for such fields like login or names. [default: true] 
excludeChars  this characters cannot occure in generated string [default: no default value] 
nulls  How many nulls should this generator produce per every 100 generations? [0 - 100, default: 0] 

ex)

<column name="STRINGA" databaseDefault="false">
<generator type="pl.kernelpanic.dbmonster.generator.StringGenerator">
<property name="allowSpaces" value="false"/>
<property name="excludeChars" value=""/>
<property name="maxLength" value="10"/>
<property name="minLength" value="0"/>
<property name="nulls" value="10"/>
</generator>
</column>

 

Boolean generator
Name : Boolean Generator
Full type name : pl.kernelpanic.dbmonster.generator.BooleanGenerator
SQL : types boolean
Description : Returns true, false or null.
Properties
probability  how many of "trues" should this generator produce per every 100 generations? [0 - 100, default: 50] 
nulls  How many nulls should this generator produce per every 100 generations? [0 - 100, default: 0] 

ex)

<column name="BOOLEANA" databaseDefault="false">
<generator type="pl.kernelpanic.dbmonster.generator.BooleanGenerator">
<property name="nulls" value="10"/>
<property name="probability" value="50"/>
</generator>
</column>

 

Constant generator
Name : Constant Generator
Full type name : pl.kernelpanic.dbmonster.generator.ConstantGenerator
SQL : types any convertable from/to string
Description : Returns always the same constant.
Properties
constant  constant value, any value convertable from/to string. Please notice that dbMonster does not this conversion itself but passes this process to JDBC driver. It's up to JDBC driver to deal with this value. [default: null] 

 

DateTime generator
Name : Date/Time Generator
Full type name : pl.kernelpanic.dbmonster.generator.DateTimeGenerator
SQL types : timestamp, date, time
Description : Returns a date, timestamp or time from a range. If you do not give a time zone - the default time zone will be used. The minimal survival date string is yyyy-MM-dd.
Properties
startDate  Start date in format yyyy-MM-dd HH:mm:ss.S Z. [default: I don't know)] 
endDate  End date in format yyyy-MM-dd HH:mm:ss.S Z. [default: I don't know)] 
returnedType  time, date, timestamp. [default: date] 
nulls  How many nulls should this generator produce per every 100 generations? [0 - 100, default: 0] 

ex)

<column name="TIMESTAMPA" databaseDefault="false">
<generator type="pl.kernelpanic.dbmonster.generator.DateTimeGenerator">
<property name="startDate" value="2011-12-31 19:00:00"/>
<property name="endDate" value="2012-12-31 06:24:13"/>
<property name="nulls" value="10"/>
<property name="returnedType" value="timestamp"/>
</generator>
</column>

 

Number generator
Name : Number Generator
Full type name : pl.kernelpanic.dbmonster.generator.NumberGenerator
SQL types : from short to numeric
Description : Returns random number.
Properties
minValue  minimal value [default: 0] 
maxValue  maximal value [default: 127] 
returnedType  short, integer, long, float, double, numeric [default: short] 
scale  number of fraction digits [default: 0 ] 
nulls  How many nulls should this generator produce per every 100 generations? [0 - 100, default: 0] 

ex)

<column name="INTA" databaseDefault="false">
<generator type="pl.kernelpanic.dbmonster.generator.NumberGenerator">
<property name="maxValue" value="214748364"/>
<property name="minValue" value="100"/>
<property name="nulls" value="10"/>
<property name="returnedType" value="integer"/>
<property name="scale" value="0"/>
</generator>
</column>

 

Null generator
Name : Null Generator
Full type name : pl.kernelpanic.dbmonster.generator.NullGenerator
SQL types : any
Description :Returns random null

Foreign Key generator
Name : Foreign Key Generator
Full type name : pl.kernelpanic.dbmonster.generator.ForeignKeyGenerator
SQL types : any
Description : Returns value based on a foreign key constraint.
Properties
tableName  Name of the table.
columnName  Name of the column. 

Dictionary generator
Name : Dictionary Generator
Full type name : pl.kernelpanic.dbmonster.generator.DictionaryGenerator
SQL types : any text datatype
Description : Returns value based on a dictionary. A dictionary i a text file containing items. Each row is a new unique item. Dictionary may be compressed using ZIP or GZIP algorithm. Compressed dictionarie's names must contain .zip or .gz suffix otherwise they will be not recognized.
Properties
dictFile  Path to the dictionary relative to the schema file or absolute. 
unique  Should this generator return unique or random value? [default: false] 

 

'Open Sources > ETC' 카테고리의 다른 글

SonarQube  (0) 2016.02.03
업무 관리 도구 - 트렐로(Trello)  (0) 2014.07.12
Datagenerator - dbMonster Installation Guide  (0) 2013.03.05
Datagenerator - generatedata.com  (0) 2013.03.05
Grinder  (0) 2013.03.05

댓글