Data type and specific values

The following generators populate a column with a specific value or a random value of a specific type.

For information about the API data models for these generators, go to Data type and specific values in the column attributes.

Array

Populates the column with an array.

To populate the array values, you select a generator. For example, if you select the Number generator, you get an array of numeric values. If you select the Object generator, you get an array of JSON objects.

The generator configuration includes a distribution option to determine the number of items in the array.

Note that you cannot use the following generators for array items:

  • Column From Another Table

  • Number with variants

  • Rank

  • SQL

  • Sum From Another Table

  • Sum Of Previous Rows

  • Unstructured Data

  • Value From Previous Row

To configure the generator:

  1. Under Items, click the generator name.

  2. On the Item Settings panel, from the Generator dropdown list, select the generator to use.

  3. Configure the generator. For information about the configuration options for specific generators, go to Configuring a column and the Generator reference.

  4. Click Apply Changes.

  5. From the Number of Items dropdown list, select the distribution option to determine the number of items in the array. The available distribution options are:

    • Fixed - Generates a fixed number of values in each array.

    • Uniform - Generates a uniform distribution for the number of values in each array.

    • Normal - Generates a normal distribution for the number of values in each array.

  6. Configure the selected distribution.

Fixed

For a fixed distribution, in the Exactly field, specify the exact number of values in the array.

Uniform

For a uniform distribution, to configure the distribution:

  1. In the Minimum field, set the minimum number of values.

  2. In the Maximum field, set the maximum number of values.

Normal

For a normal distribution, to configure the distribution:

  1. In the Minimum field, set the minimum number of values.

  2. In the Mean field, set the mean number of values.

  3. In the Standard Deviation field, set the standard deviation from the mean for the number of values.

  4. In the Maximum field, set the maximum number of values.

Blank

The Blank generator inserts a null value.

Boolean

Inserts a random boolean value - either true or false.

Constant

Inserts the same value into all of the rows.

In the Value field, provide the value to use.

Image (Binary)

Produces a JPEG image in binary format.

Lorem Ipsum

Populates the column with filler text.

To configure the generator:

  1. From the Generate dropdown list, select whether to generate:

    1. Words - In other words, a single phrase

    2. Sentences

    3. Paragraphs

  2. From the Distribution dropdown list, select the distribution method for the lengths of the generated values among the rows.

  3. Configure the selected distribution.

The available distributions are:

  • Fixed - Generates a fixed length for each value.

  • Uniform - Generates a uniform distribution of content length.

  • Normal - Generates a normal distribution of content length.

Fixed

For a Fixed distribution, in the Exactly field, specify the length to use for each value.

Uniform

For a Uniform distribution, to configure the distribution:

  1. In the Minimum field, set the minimum length.

  2. In the Maximum field, set the maximum length.

Normal

For a normal distribution, to configure the distribution:

  1. In the Minimum field, set the minimum length.

  2. In the Mean field, set the mean length.

  3. In the Standard Deviation field, set the standard deviation from the mean for the lengths.

  4. In the Maximum field, set the maximum length.

Number

Inserts a numeric value.

To configure the generator, from the Distribution dropdown list, select the method to use to distribute the values among the rows.

  • Autoincrement - Increments the numeric values in each row.

  • Uniform - Generates a uniform distribution of numeric values.

  • Binomial - Generates a binomial distribution of numeric values.

  • Exponential - Increments the numeric values exponentially.

  • Geometric - Generates a geometric distribution of numeric values.

  • Normal - Generates a normal distribution of numeric values.

  • Poisson - Generates a poisson distribution of numeric values.

  • Series - Generates a series of numeric values.

The distribution type determines the configuration options.

Autoincrement

For an Autoincrement distribution, in the Start at field, provide the number to start with.

Uniform

For a Uniform distribution, to configure the default distribution:

  1. In the Minimum field, set the minimum value.

  2. In the Maximum field, set the maximum value.

  3. In the Decimals field, set the number of decimal places to use.

You can also configure variants that are based on a specified condition. For example, you might use the variant when another column contains a specific value, or use the variant in 5% of the records. To add a variant:

  1. Click Add Variant.

  2. To make the condition based on a SQL expression:

    1. From the condition type dropdown list, select SQL expression.

    2. In the condition field, provide the expression to use to identify when to use the variant.

  3. To make the condition based on a percentage of records that should use the variant:

    1. From the condition type dropdown list, select percentage.

    2. In the percentage field, type the percentage.

  4. Configure the distribution values to use for the variant.

To remove a variant, click Remove.

Binomial

For a Binomial distribution, to configure the default distribution:

  1. In the Trials field, set the number of tests to run.

  2. In the Success Probability field, set the success probability for the generated values.

You can also configure variants that are based on a specified condition. For example, you might use the variant when another column contains a specific value, or in 5% of the records. To add a variant:

  1. Click Add Variant.

  2. To make the condition based on a SQL expression:

    1. From the condition type dropdown list, select SQL expression.

    2. In the condition field, provide the expression to use to identify when to use the variant.

  3. To make the condition based on a percentage of records that should use the variant:

    1. From the condition type dropdown list, select percentage.

    2. In the percentage field, type the percentage.

  4. Configure the distribution values to use for the variant.

To remove a variant, click Remove.

Exponential

For an exponential distribution, to configure the default increment:

  1. In the Minimum field, set the minimum value.

  2. In the Rate field, set the rate of increase for the values.

  3. In the Maximum field, set the maximum value.

  4. In the Decimals field, set the number of decimal places to use.

You can also configure variants that are based on a specified condition. For example, you might increase the value by a different amount when another column contains a specific value, or in 5% of the records. To add a variant:

  1. Click Add Variant.

  2. To make the condition based on a SQL expression:

    1. From the condition type dropdown list, select SQL expression.

    2. In the condition field, provide the expression to use to identify when to use the variant.

  3. To make the condition based on a percentage of records that should use the variant:

    1. From the condition type dropdown list, select percentage.

    2. In the percentage field, type the percentage.

  4. Configure the distribution values to use for the variant.

To remove a variant, click Remove.

Geometric

For a geometric distribution, to configure the default distribution:

  1. In the Minimum field, set the minimum value.

  2. In the Success Probability field, set the success probability for the generated values.

  3. In the Maximum field, set the maximum value.

  4. In the Decimals field, set the number of decimal places to use.

You can also configure variants that are based on a specified condition. For example, you might use the variant when another column contains a specific value, or in 5% of the records. To add a variant:

  1. Click Add Variant.

  2. To make the condition based on a SQL expression:

    1. From the condition type dropdown list, select SQL expression.

    2. In the condition field, provide the expression to use to identify when to use the variant.

  3. To make the condition based on a percentage of records that should use the variant:

    1. From the condition type dropdown list, select percentage.

    2. In the percentage field, type the percentage.

  4. Configure the distribution values to use for the variant.

To remove a variant, click Remove.

Normal

For a normal distribution, to configure the default distribution:

  1. In the Minimum field, set the minimum value.

  2. In the Mean field, set the mean value.

  3. In the Standard Deviation field, set the standard deviation from the mean for the values.

  4. In the Maximum field, set the maximum value.

  5. In the Decimals field, set the number of decimal places to use.

You can also configure variants that are based on a specified condition. For example, you might use the variant when another column contains a specific value. To add a variant:

  1. Click Add Variant.

  2. In the Condition field, provide the expression to use to identify when to use the variant.

  3. Configure the distribution values to use for the variant.

To remove a variant, click Remove.

Poisson

For a Poisson distribution, to configure the default distribution:

  1. In the Minimum field, set the minimum value.

  2. In the Mean field, set the mean value.

  3. In the Maximum field, set the maximum value.

  4. In the Decimals field, set the number of decimal places to use.

You can also configure variants that are based on a specified condition. For example, you might use the variant when another column contains a specific value, or in 5% of the records. To add a variant:

  1. Click Add Variant.

  2. To make the condition based on a SQL expression:

    1. From the condition type dropdown list, select SQL expression.

    2. In the condition field, provide the expression to use to identify when to use the variant.

  3. To make the condition based on a percentage of records that should use the variant:

    1. From the condition type dropdown list, select percentage.

    2. In the percentage field, type the percentage.

  4. Configure the distribution values to use for the variant.

To remove a variant, click Remove.

Series

For a series of values, to configure the default series:

Start and end columns

You can base the start and end values on other numeric columns in the table.

  1. From the Start At dropdown list, select the numeric column to use as the starting value.

  2. From the End At dropdown list, select the numeric column to use as the ending value.

Partitioning the series

You can partition the series based on other columns. For example, you can have one series of values for the United States, and another series for France.

To partition the series:

  1. From the Partition By dropdown list, select the column to use for the partition.

  2. From the Order By dropdown list, select the column to use to sort the rows in each partition.

Decimal places

In the Decimals field, specify the number of decimal places to use for the values.

Curve

From the Curve Type dropdown list, select the type of curve to use.

  1. To generate the series along a linear curve, select linear. This is the default

  2. To generate the series along an exponential curve:

    1. Select exponential.

    2. In the Rate field, set the rate of increase.

  3. To generate the series along a logarithmic curve:

    1. Select logarithmic.

    2. In the Rate field, set the rate of increase.

  4. To match the curve to values from another column in the table:

    1. Select from column.

    2. From the column dropdown list, select the column to use.

Volatility

Volatility determines the deviation from the curve.

To use a fixed percentage volatility:

  1. From the Volatility dropdown list, select fixed.

  2. In the field, provide the percentage of volatility. The higher the percentage, the bumpier the curve.

To base the volatility on another column in the table:

  1. From the Volatility dropdown list, select from column.

  2. From the column dropdown list, select the column to use.

Configuring variants

You can also configure variants that are based on a specified condition. For example, you might use the variant when another column contains a specific value, or in 5% of the records. To add a variant:

  1. Click Add Variant.

  2. To make the condition based on a SQL expression:

    1. From the condition type dropdown list, select SQL expression.

    2. In the condition field, provide the expression to use to identify when to use the variant.

  3. To make the condition based on a percentage of records that should use the variant:

    1. From the condition type dropdown list, select percentage.

    2. In the percentage field, type the percentage.

  4. Configure the distribution values to use for the variant.

To remove a variant, click Remove.

Object

Populates the column with a JSON object. You configure the list of fields in the object. For each field, you select and configure the generator to use to populate the field.

You can use the Object and Array generators to set up a nested JSON structure. For example, you can assign the Object generator to a field, or assign the Array generator to a field and use the Object generator to populate the array.

To define the list of object fields, you can either:

  • Import a JSON schema or sample JSON content. Fabricate then automatically creates the fields and assigns generators.

  • Manually define a list of fields.

Note that you cannot use the following generators for object fields:

  • Column From Another Table

  • Number with variants

  • Rank

  • SQL

  • Sum From Another Table

  • Sum Of Previous Rows

  • Unstructured Data

  • Value From Previous Row

Importing a JSON schema or example

To import a JSON schema or JSON example value:

  1. Click Import JSON Schema or Example.

  2. On the panel, in the text area, paste the JSON schema or an example of the JSON object.

  3. Click Apply.

Fabricate uses the provided schema or JSON to set up the initial list of fields and assign generators to those fields.

Adding a field manually

To add an object field:

  1. Click Add Field.

  2. On the field settings panel, in the Name field, provide the field name.

  3. From the Generator dropdown list, select the generator to use to populate the field value.

  4. Configure the generator. For information about the configuration options for specific generators, go to Configuring a column and the Generator reference.

  5. After you configure the generator:

    • To save the field and close the panel, click Save and Close.

    • To save the field and add another field, click Save and Create Another.

Updating the field configuration

To change the field configuration:

  1. Hover over the field name.

  2. Click the settings icon.

  3. On the field settings panel, update the configuration.

  4. Click Save and Close.

Removing a field

To remove an object field:

  1. Hover over the field name.

  2. Click the settings icon.

On the field settings panel, click Delete.

UUID

Generates a random universally unique identifier (UUID).

Last updated