Simple Type Generators¶
Simple Type Generators in DATAMIMIC are essential for generating fundamental data types like strings, numbers, and other basic data types. These generators are highly configurable, allowing you to specify patterns, ranges, and formats to produce realistic test data.
AcademicTitleGenerator¶
Generates academic titles.
Properties:
dataset
: Either a region name or the two-letter-ISO-code of a country. Supported dataset: US, DE, FR, CN, ITquota
: The quota of generated title. (default: 0.5)
1 |
|
1 |
|
Sample Output:
1 2 3 4 5 6 |
|
BirthdateGenerator¶
Generate a random date of birth.
Properties:
min_age
: Minimum age value. (default: 1)max_age
: Maximum age value. (default: 100)
1 |
|
1 |
|
Sample Output:
1 2 3 4 5 |
|
With outDateFormat:
1 |
|
Sample Output:
1 2 3 4 5 |
|
BooleanGenerator¶
Generates boolean values.
1 |
|
Sample Output:
1 2 3 4 5 |
|
CNPJGenerator¶
Generates Brazilian company identification numbers (CNPJ).
1 |
|
Sample Output:
1 2 3 4 5 |
|
CPFGenerator¶
Generates Brazilian individual taxpayer registry identification (CPF).
1 |
|
1 2 3 4 5 |
|
CompanyNameGenerator¶
Generates company names.
1 |
|
Sample Output:
1 2 3 4 5 |
|
DateTimeGenerator¶
Generates date and time values.
Properties:
min
: Minimum date value. (optional)max
: Maximum date value. (optional)input_format
: date format. (default: %Y-%m-%d %H:%M:%S)
1 |
|
Sample Output:
1 2 3 4 5 |
|
With outDateFormat:
1 2 3 |
|
Sample Output:
1 2 3 4 5 |
|
DomainGenerator¶
Generates domain names.
1 |
|
Sample Output:
1 2 3 4 5 |
|
EANGenerator¶
Generates International Article Numbers (EAN).
1 |
|
Sample Output:
1 2 3 4 5 |
|
EmailAddressGenerator¶
Generates email addresses.
1 |
|
Sample Output:
FamilyNameGenerator¶
Generates family names.
1 |
|
Sample Output:
1 2 3 4 5 |
|
GivenNameGenerator¶
Generates given names.
1 |
|
Sample Output:
1 2 3 4 5 |
|
IncrementGenerator¶
Generates numbers starting with one and incrementing the number on each subsequent call.
Properties:
start
: Begin value. (default: 1)end
: Maximum value. (default: 9223372036854775807)1
<key name="incremental_id" generator="IncrementGenerator"/>
Sample Output:
1 2 3 4 5 |
|
1 |
|
Sample Output:
1 2 3 4 5 |
|
IntegerGenerator¶
Generates integer values.
Properties:
min
: Minimum integer value. (default: 0)max
: Maximum integer value. (default: 10)
1 |
|
Sample Output:
1 2 3 4 5 |
|
PhoneNumberGenerator¶
Generates phone numbers.
1 |
|
Sample Output:
1 2 3 4 5 |
|
SectorGenerator¶
Generates business sectors.
1 |
|
Sample Output:
1 2 3 4 5 |
|
SSNGenerator¶
Generates Social Security Numbers (SSN).
1 |
|
Sample Output:
1 2 3 4 5 |
|
StringGenerator¶
Generates strings based on length characteristics. This is the typical component for generating code numbers.
Properties:
min_len
: Minimum string length. (default: 1)max_len
: Maximum string length. (default: 10)
1 |
|
Sample Output:
1 2 3 4 5 |
|
FloatGenerator¶
Generates decimal number.
Properties:
min
: Minimum value. (default: 1)max
: Maximum value. (default: 10)granularity
: level of fractional part. (default: 0.1)
1 |
|
Sample Output:
1 2 3 4 5 |
|
UUIDGenerator¶
Generates universally unique identifiers (UUID).
1 |
|
Sample Output:
1 2 3 4 5 |
|
Example Usage of Simple Type Generators¶
Consider the following example of a DATAMIMIC model using these simple type generators:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
In this example:
<AcademicTitleGenerator>
generates academic titles.<BooleanGenerator>
generates boolean values.<CNPJGenerator>
generates Brazilian company identification numbers.<CPFGenerator>
generates Brazilian individual taxpayer registry identification.<CompanyNameGenerator>
generates company names.<DateTimeGenerator>
generates date and time values within a specified range.<DomainGenerator>
generates domain names.<EANGenerator>
generates International Article Numbers.<EmailAddressGenerator>
generates email addresses.<FamilyNameGenerator>
generates family names.<GivenNameGenerator>
generates given names.<IncrementGenerator>
generates incrementing IDs.<IntegerGenerator>
generates integer values within a specified range.<PhoneNumberGenerator>
generates phone numbers.<SectorGenerator>
generates business sectors.<SSNGenerator>
generates Social Security Numbers.<StringGenerator>
generates random strings based on specified characteristics.<UUIDGenerator>
generates universally unique identifiers.
By utilizing these simple type generators, you can create diverse and realistic datasets for comprehensive testing scenarios in DATAMIMIC.