Mockers

Mockers can be especially useful in the following situations:

  1. To fill columns that contain directly identifiable information, such as Personally Identifiable Information (PII).

  2. To fill columns that do not contain any data yet. Also, see: related FAQ question.

Apply a mocker

You can apply mockers in two different manners, via the Job Configuration tab, or via the PII tab.

Apply mocker via Job Configuration

You can apply a mocker on a column via the Job Configuration tab as follows:

  1. Open your Workspace.

  2. On the Job Configuration tab, select the column icon on the top left of the column where you want to apply a mocker.

  3. Under Column settings > Generation Method, select Mocker to view the list of available mockers.

  4. Select the Mocker that you wish to apply from the dropdown list of available mockers.

  5. Set the relevant mocker parameters.

  6. Select Confirm.

Apply mocker via PII tab

You can apply a mocker on a column via the PII tab as follows: Identify PII columns manually.

Edit mock data settings

To edit any mock data settings you have applied previously:

  1. Open your Workspace.

  2. Now you can either:

    1. On the Job Configuration tab, select the column icon on the top left of the column where you want to edit a mocker.

    2. On the Job Configuration tab, under Applied steps, select the Edit icon next to the column name where you want to edit a mocker.

    3. On the PII tab, select the Edit icon behind the column where you want to edit a mocker.

  3. Under Generation Method, define the parameters that you want to change.

  4. Select Confirm.

Mocker parameters

When setting the parameters for a mocker, you have various options to tailor the data according to your needs. Here are the main mocker parameters that are shared across mockers:

  1. Consistent mapping

    • Description: Enabling the consistent mapping allows you to generate the same mock data values for a given set of original data values every time the mocker is applied.

    • Options:

      • Enable: Turn on to consistently generate the same mock values for the same some original values.

      • Disable: Turn off consistent mapping to generate random mock data.

    • Considerations: It is possible that same original input value is consistently mapped to the same output mock value. For example, John and Mike in the original data can possibly both be mapped to Eric in the mock data.

    • Usage: When you need to consistently generate the same mock values for testing or demonstration purposes.

    For more information on consistent mapping, please check Consistent mapping.

  2. Unique

    • Description: This option ensures that only unique values are generated in the specified column.

    • Options:

      • Enable: Turn on to generate only unique values.

      • Disable: Turn off to allow for repeated values.

    • Considerations: When the range of possible values is small, it may become impossible to generate unique values after a certain number of iterations.

    • Usage: When mocking columns that should contain distinct values like IDs or usernames.

Available mockers

MockerReturn typeDescription

Aba

String

A 9-digit American Bankers Association routing number used for electronic transactions.

Address

String

A street address, including street name and number, city, state/province, and postal code.

AM or PM

String

Either 'AM' or 'PM'.

Android platform token

String

A 10-character Android platform token.

Ascii company email

String

An ASCII company email address.

ASCII email

String

An ASCII email address.

ASCII free email

String

An ASCII free email address.

ASCII safe email

String

An ASCII safe email address.

Bank country

String

A country that uses the International Bank Account Number (IBAN) system.

BBAN

String

A Basic Bank Account Number (BBAN) used in countries that do not use the IBAN system.

Boolean

Boolean

Either True or False.

Bs

String

A business slogan or catchphrase.

Building number

String

A building number.

Catch phrase

String

A catchphrase or slogan used by a company.

Century

String

A century, such as '19th' or '21st'.

City

String

A city name.

City suffix

String

A common suffix for city names, such as 'town' or 'ville'.

Color

String

A random color in hexadecimal format.

Color (HSL)

String

A random color using the HSL (Hue, Saturation, Lightness) color mode.

Color (HSV)

String

A random color using the HSV (Hue, Saturation, Value) color model.

Color (RGB)

String

A random color using the RGB (Red, Green, Blue) color model.

Color name

String

A color name, such as 'red' or 'green'.

Company

String

A company name.

Company email

String

A company email address.

Company suffix

String

A common suffix for company names, such as 'Inc.' or 'Ltd.'.

Coordinate

String

A random geographical coordinate (latitude and longitude).

Country

String

A country name.

Country code

String

A two-letter country code, such as 'US' or 'GB'.

Credit card number

String

A valid credit card number.

Credit card provider

String

A credit card provider name, such as 'Visa' or 'MasterCard'.

Credit card security code

String

A security code for a credit card.

Cryptocurrency

String

A cryptocurrency name.

Cryptocurrency code

String

A cryptocurrency code, such as 'BTC' or 'ETH'.

Cryptocurrency name

String

A cryptocurrency name.

Currency

String

A currency name.

Currency code

String

A three-letter currency code, such as 'USD' or 'EUR'.

Currency name

String

A currency name.

Currency symbol

String

A random currency symbol.

Day of month

String

A day of the month, from 1 to 31.

Day of week

String

A day of the week, such as 'Monday' or 'Friday'.

Domain name

String

A domain name, such as 'example.com'.

Domain word

String

A single word that could be used in a domain name.

File extension

String

A random file extension from a set of common file types.

File name

String

A random file name including an extension.

File path

String

A random file path, optionally including a file name at the end.

Firefox

String

A user agent string for the Firefox browser.

First name

String

A first name.

First name female

String

A female first name.

First name male

String

A male first name.

First name nonbinary

String

A non-binary first name.

Free email

String

A free email address.

Free email domain

String

A domain name used for free email addresses.

Hex color

String

A hexadecimal color code, such as '#FF0000'.

Host name

String

A random host name for a website or a networked device.

HTTP method

String

An HTTP method, such as 'GET' or 'POST'.

HTTP status code

String

A random HTTP status code from a list of commonly used codes.

IANA ID

String

An Internet Assigned Numbers Authority (IANA) ID.

IBAN

String

An International Bank Account Number (IBAN).

Internet explorer

String

A user agent string for the Internet Explorer browser.

Ios platform token

String

An Apple iOS platform token.

IPv4

String

An IPv4 address.

IPV4 network class

String

The network class of an IPv4 address.

IPv4 private

String

A private IPv4 address.

IPv4 public

String

A public IPv4 address.

IPv6

String

An IPv6 address.

ISBN-10

String

An ISBN-10 book identifier.

ISBN-13

String

An ISBN-13 book identifier.

Job

String

A job title, such as "Marketing Manager" or "Software Engineer".

Language code

String

A language code, such as "en" for English or "fr" for French, based on the ISO 639-1 standard.

Language name

String

The name of a language, such as "English" or "French", based on the ISO 639-1 standard.

Last name

String

A last name, such as "Smith" or "Garcia".

Last name female

String

A last name suitable for a female person, such as "Johnson" or "Gonzalez".

Last name male

String

A last name suitable for a male person, such as "Smith" or "Rodriguez".

Last name nonbinary

String

A last name suitable for a nonbinary person, such as "Taylor" or "Lee".

Latitude

Decimal

A randomly generated latitude coordinate in the range of -90.0 to 90.0.

Latitude

Decimal

A randomly generated longitude coordinate in the range of -180.0 to 180.0.

Latitude longitude

Decimal

A tuple of (latitude, longitude) coordinates.

License plate

String

A randomly generated license plate number.

Linux platform token

String

A randomly generated Linux platform token.

Linux processor

String

A randomly generated Linux processor name.

Locale

String

A randomly generated locale string.

Localized ean13

String

A randomly generated localized EAN-13 barcode number.

Localized ean8

String

A randomly generated localized EAN-8 barcode number.

Longitude

Decimal

A randomly generated longitude coordinate in the range of -180.0 to 180.0.

Mac address

String

A randomly generated MAC address.

Mac platform token

String

A randomly generated macOS platform token.

Mac processor

String

A randomly generated macOS processor name.

MD5

Bytes, String

A randomly generated MD5 hash.

Month

String

A randomly generated month number in the range of 1 to 12.

Month name

String

A randomly generated month name.

Name

String

A randomly generated full name.

Name female

String

A randomly generated female full name.

Name male

String

A randomly generated male full name.

Name nonbinary

String

A randomly generated non-binary full name.

Null boolean

Boolean

A randomly generated boolean value or null.

Opera

String

A randomly generated Opera browser user agent string.

Phone number

String

A randomly generated phone number.

Port number

Integer

A random network port number typically used for computer networking.

Postcode

String

A randomly generated postal code.

Prefix

String

A randomly generated name prefix.

Prefix female

String

A randomly generated female name prefix.

Prefix male

String

A randomly generated male name prefix.

Prefix nonbinary

String

A randomly generated non-binary name prefix.

Pricetag

String

A randomly generated price tag in a format like $12.34.

Pybool

Boolean

A randomly generated Python boolean value.

Random digit

Integer

A randomly generated digit character.

Random digit not null

Integer

A randomly generated non-zero digit character.

Random digit not null or empty

String

A randomly generated non-zero digit character or an empty string.

Random digit or empty

String

A randomly generated digit character or an empty string.

Random letter

String

A randomly generated letter character.

Random lowercase letter

String

A randomly generated lowercase letter character.

Random uppercase letter

String

A randomly generated uppercase letter character.

Rgb color

String

A randomly generated RGB color in the format of (r, g, b).

Rgb css color

String

A randomly generated RGB color in the format of "rgb(r, g, b)".

Ripe id

String

A randomly generated RIPE network identifier.

Safari

String

A randomly generated Safari browser user agent string.

Safe color name

String

A randomly generated safe color name.

Safe domain name

String

A randomly generated safe domain name.

Safe email

String

A randomly generated safe email address.

Safe hex color

String

A randomly generated safe hex color.

SHA-1

Bytes, String

A randomly generated SHA1 hash.

SHA-256

Bytes, String

A randomly generated SHA256 hash.

SSN

String

A randomly generated US Social Security number.

Street address

String

A randomly generated street address.

Street name

String

A randomly generated street name.

Street suffix

String

A randomly generated street suffix.

Suffix

String

A randomly generated name suffix.

Suffix female

String

A randomly generated female name suffix.

Suffix male

String

A randomly generated male name suffix.

Suffix nonbinary

String

A randomly generated non-binary name suffix.

Swift

String

A randomly generated SWIFT/BIC code.

Swift11

String

A randomly generated 11-character SWIFT/BIC code.

Swift8

String

A randomly generated 8-character SWIFT/BIC code.

Time

String

A random time of day.

Timezone

String

A string representing a timezone, such as "America/New_York" or "UTC".

Tld

String

A top-level domain name, such as "com", "org", or "net".

Unix time

Decimal

A random Unix timestamp, representing the number of seconds since the Unix epoch (January 1, 1970).

Uri

String

A complete URI, including scheme, hostname, path, and query parameters.

Uri extension

String

A file extension, such as ".html" or ".pdf", suitable for use in a URI.

Uri page

String

A URI path component suitable for use as a page name or ID, such as "/about" or "/products/123".

URL

String

A complete URL, including scheme, hostname, path, query parameters, and fragment identifier.

User agent

String

A string representing a user agent, such as "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3".

User name

String

A string representing a username, typically in the form "firstname.lastname" or "firstnamelastname".

UUID

Bytes, String

A string representing a UUID (universally unique identifier) in version 4 format, such as "c4015ce3-5eaa-49fe-9ebd-59e683f28588".

VAT ID

String

A random VAT ID. Only supported for specific locales.

Windows platform token

String

A string representing a version of the Windows operating system, such as "Windows NT 10.0" or "Windows 8.1".

Year

String

A random year between 1 AD and the current year.

Advanced mockers

Mocker nameReturn typeDescription

Custom text

String

Generate a string with each placeholder in custom text replaced according to the following rules:

  • Number signs (‘#’) are replaced with a random digit (0 to 9).

  • Question marks (‘?’) are replaced with a random character from letters.

By default, letters contains all ASCII letters, uppercase and lowercase.

Custom integer

Integer

Generate numeric values with each placeholder in custom integer replaced according to the following rules:

  • Number signs (‘#’) are replaced with a random digit (0 to 9).

  • Percent signs (‘%’) are replaced with a random non-zero digit (1 to 9).

  • Dollar signs (‘$’) are replaced with a random digit above two (2 to 9).

Additionally, any digits between 0 and 9 can be used in the pattern, apart from 0 as the first character.

For example, '%#$#' will create a 4 digit number following the rules above.

Date

Date

A random date object between two specified date objects, from year until days.

Datetime

Datetime

A random datetime object between two specified datetime objects, from year until seconds.

DatetimeString

String

A random string between two specified datetime objects, from year until seconds.

Parameters:

  • Format: Format of the datetime string (year-month-day by default).

JSON

JSON

This mocker uses Faker to create randomized, complex JSON data, simulating real-world scenarios with specified data types across fields.

  • Parameters:

    • data_columns(dict): Specification for the data structure

    • num_rows(int): Number of rows the returned

    • indent(int): number of spaces to indent the fields

    • cls(json.JSONEncoder): Optional JSON encoder to use for non-standard objects such as datetimes

  • Returns:

    • A string representation of the generated JSON data.

  • Example:

    {"Name":"name", "Address":"address"}
    {"Name": "Rebecca Crawford", "Address": "USCGC Harrell\nFPO AP 64614"},
    {"Name": "Mark Ayala", "Address": "979 Clay Vista Apt. 789\nNew Zacharymouth, NC 40691"},
    {"Name": "Stephanie Chaney", "Address": "852 Debbie Valley\nBrittanystad, FM 41302"}

To refer to the Faker documentation: https://faker.readthedocs.io/en/master/providers/faker.providers.misc.html#faker.providers.misc.Provider.json

Custom Sampler (string, integer or float)

String or Numeric (depending on provided values)

A random string object, sampled from a provided list of input values.

  • Parameters:

    • values (comma separated values): The list of values to sample from.

  • Returns:

    • A randomly sampled value from values.

Uniform Distribution (float)

Decimal

Generates a random float between two given values.

  • Parameters:

    • min_value (float): The minimum value of the float (inclusive).

    • max_value (float): The maximum value of the float (exclusive).

    • precision (int, optional): The number of decimal places to include in the float (default is 10, which generates a float with up to 10 decimal places).

  • Returns:

    • A random float between min_value and max_value, with precision decimal places.

Uniform Distribution (int)

Integer

uniform_integer: Generates a random integer between two given values.

  • Parameters:

    • min_value (int): The minimum value of the integer (inclusive).

    • max_value (int): The maximum value of the integer (exclusive).

  • Returns:

    • A random integer between min_value and max_value.

Numeric Series

Numeric Series: Generates integer series at given steps.

  • Parameters:

    • Start (int): The minimum value of the integer (inclusive).

    • Step (int): The step at a size integer series will continue.

  • Returns:

    • Integer series starting at Start with Steps. If Start = 2 and Steps = 3, then series will be 2,5,8,11...

Supported languages

Syntho supports each mocker in multiple different languages. For the complete list of supported languaged, see the following section:

Supported languages

The default language used by each mocker is English (United States). In case a language is not available for a particular mocker, the mocker will revert back to this language.

Limitations & Considerations

  • Constraints on Key Columns: Mockers cannot be applied to primary key or foreign key columns.

  • Column-by-Column Operation: Mockers function on individual columns. At this point, they can't be used to preserve logical relationships across multiple columns.

  • Automatically Cutoff Values: The Syntho platform automatically cuts off generated mock string/text values based on the data type's supported length. For example, a mocker applied on an NVARCHAR(5) column, will cutoff all values beyond the first 5 characters of the string.

  • Automatically Clip Values: The Syntho platform automatically clips numerical values that exceed the maximum or minimum size, to the largest or smallest value supported by the data type, respectively.

  • No Link with Original Records: Mockers do not link back to the original data records, enhancing privacy but potentially reducing the usefulness of the data. If you want to retain the link with the original values, you can enable the Consistent Mapping feature.

  • Database Type Compatibility: The return type of a mocker indicates its compatibility with specific database data types. For example, a mocker with a String return type is compatible with database types like (N)VARCHAR or TEXT, but not with a database type INTEGER. It is important to this into account when applying mockers on your columns to prevent your data generation job to fail.

Being aware of these limitations and considerations will help you effectively use mockers while understanding their constraints.

Last updated