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:
Under Items, click the generator name.
On the Item Settings panel, from the Generator dropdown list, select the generator to use.
Configure the generator. For information about the configuration options for specific generators, go to Configuring a column and the Generator reference.
Click Apply Changes.
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.
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:
In the Minimum field, set the minimum number of values.
In the Maximum field, set the maximum number of values.
Normal
For a normal distribution, to configure the distribution:
In the Minimum field, set the minimum number of values.
In the Mean field, set the mean number of values.
In the Standard Deviation field, set the standard deviation from the mean for the number of values.
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:
From the Generate dropdown list, select whether to generate:
Words - In other words, a single phrase
Sentences
Paragraphs
From the Distribution dropdown list, select the distribution method for the lengths of the generated values among the rows.
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:
In the Minimum field, set the minimum length.
In the Maximum field, set the maximum length.
Normal
For a normal distribution, to configure the distribution:
In the Minimum field, set the minimum length.
In the Mean field, set the mean length.
In the Standard Deviation field, set the standard deviation from the mean for the lengths.
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:
In the Minimum field, set the minimum value.
In the Maximum field, set the maximum value.
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:
Click Add Variant.
To make the condition based on a SQL expression:
From the condition type dropdown list, select SQL expression.
In the condition field, provide the expression to use to identify when to use the variant.
To make the condition based on a percentage of records that should use the variant:
From the condition type dropdown list, select percentage.
In the percentage field, type the percentage.
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:
In the Trials field, set the number of tests to run.
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:
Click Add Variant.
To make the condition based on a SQL expression:
From the condition type dropdown list, select SQL expression.
In the condition field, provide the expression to use to identify when to use the variant.
To make the condition based on a percentage of records that should use the variant:
From the condition type dropdown list, select percentage.
In the percentage field, type the percentage.
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:
In the Minimum field, set the minimum value.
In the Rate field, set the rate of increase for the values.
In the Maximum field, set the maximum value.
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:
Click Add Variant.
To make the condition based on a SQL expression:
From the condition type dropdown list, select SQL expression.
In the condition field, provide the expression to use to identify when to use the variant.
To make the condition based on a percentage of records that should use the variant:
From the condition type dropdown list, select percentage.
In the percentage field, type the percentage.
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:
In the Minimum field, set the minimum value.
In the Success Probability field, set the success probability for the generated values.
In the Maximum field, set the maximum value.
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:
Click Add Variant.
To make the condition based on a SQL expression:
From the condition type dropdown list, select SQL expression.
In the condition field, provide the expression to use to identify when to use the variant.
To make the condition based on a percentage of records that should use the variant:
From the condition type dropdown list, select percentage.
In the percentage field, type the percentage.
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:
In the Minimum field, set the minimum value.
In the Mean field, set the mean value.
In the Standard Deviation field, set the standard deviation from the mean for the values.
In the Maximum field, set the maximum value.
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:
Click Add Variant.
In the Condition field, provide the expression to use to identify when to use the variant.
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:
In the Minimum field, set the minimum value.
In the Mean field, set the mean value.
In the Maximum field, set the maximum value.
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:
Click Add Variant.
To make the condition based on a SQL expression:
From the condition type dropdown list, select SQL expression.
In the condition field, provide the expression to use to identify when to use the variant.
To make the condition based on a percentage of records that should use the variant:
From the condition type dropdown list, select percentage.
In the percentage field, type the percentage.
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.
From the Start At dropdown list, select the numeric column to use as the starting value.
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:
From the Partition By dropdown list, select the column to use for the partition.
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.
To generate the series along a linear curve, select linear. This is the default
To generate the series along an exponential curve:
Select exponential.
In the Rate field, set the rate of increase.
To generate the series along a logarithmic curve:
Select logarithmic.
In the Rate field, set the rate of increase.
To match the curve to values from another column in the table:
Select from column.
From the column dropdown list, select the column to use.
Volatility
Volatility determines the deviation from the curve.
To use a fixed percentage volatility:
From the Volatility dropdown list, select fixed.
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:
From the Volatility dropdown list, select from column.
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:
Click Add Variant.
To make the condition based on a SQL expression:
From the condition type dropdown list, select SQL expression.
In the condition field, provide the expression to use to identify when to use the variant.
To make the condition based on a percentage of records that should use the variant:
From the condition type dropdown list, select percentage.
In the percentage field, type the percentage.
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:
Click Import JSON Schema or Example.
On the panel, in the text area, paste the JSON schema or an example of the JSON object.
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:
Click Add Field.
On the field settings panel, in the Name field, provide the field name.
From the Generator dropdown list, select the generator to use to populate the field value.
Configure the generator. For information about the configuration options for specific generators, go to Configuring a column and the Generator reference.
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:
Hover over the field name.
Click the settings icon.
On the field settings panel, update the configuration.
Click Save and Close.
Removing a field
To remove an object field:
Hover over the field name.
Click the settings icon.
On the field settings panel, click Delete.
UUID
Generates a random universally unique identifier (UUID).
Last updated