Datasets Pro only

Datasets is a feature in Fake Data extension that allows you to use your own data instead of using the default ones from the Faker libraryopen in new window. For example, you can upload a CSV file with names that you want to use instead of relying on the ones that are generated by Fake Data.

Add a new Dataset

To add a new Dataset, follow the next steps:

  • Open Fake Data's options page.
  • Go to Settings -> Developer Options -> Datasets.
  • Click on "Add a new Dataset".
  • In the newly opened modal, type a name that you want for your dataset, then select a CSV file.
  • Press Save.

If the dataset was added successfully, you should see a table with the data that was imported in Fake Data.



You can also add a new Dataset from Google Sheets.

Use a Dataset in a Generator

After uploading a new Dataset, there are multiple ways to use it. One of them is by assigning it to a Generator. Both Default Generators and Custom Generators support the Dataset feature. In order to tell a Generator to use values from a Dataset column, follow the next steps:

  • Open Fake Data's options page.
  • Go to Generators -> go to either Default Generators or Custom Generators.
  • On the right side of each Generator, click on the dropdown menu and choose Dataset.
  • A second dropdown should appear immediately that will ask you to choose a column from any of your uploaded Datasets.
  • Once a column is selected, press Save.

Now each time you invoke the updated Generator, it will return a random value from the selected column in the selected Dataset.

Below is a quick demo on how to create a new Custom Generator that will use a Dataset:


TIP

In Custom Generators, if you want to get a Dataset value programmatically, you can use the fakeData.getDatasetValue('<dataset name>', '<dataset column>') method. Go to method documentation.

Assign a Dataset column to one field only

If you don't want to create a new Generator or override the existing ones, you can also quickly assign one of the Dataset columns to a form input through the Manage Field modal:

  • While filling out an online form, right-click on the input field you want to modify.
  • Go to "Fake Data" submenu and choose "Manage Field".
  • On the newly opened modal, under "Generator" section, choose Dataset.
  • A new option should show up immediately right below the "Generator" section, called "Dataset".
  • In this new dropdown, choose one of the columns from your Datasets that you want to use.
  • Press Save.

Now, when you fill the form again, your changed input field will be filled with a random value from the selected dataset column.

Here is a quick demo video:


Additional Dataset Settings

For each Dataset file you can configure a few additional settings that will affect how data is filled into forms.

You can find these settings right under the Dataset preview table, after selecting one of the existing Datasets from the dropdown menu. These additional settings can be configured for each Dataset separately.

Fill behaviour setting

  • Fill random columns from random rows: When filling multiple fields at once, Fake Data will pick for each input field a value from a random row and a random column, as shown in the following example:
First NameLast NameEmail
JaunitaRohan[email protected]
AnnettaFerry[email protected]
KarliStokes[email protected]
LilianeJohns[email protected]
CarmelHauck[email protected]
TerenceHarris[email protected]
AbnerQuigley[email protected]
PriscillaZemlak[email protected]
CorbinBins[email protected]
(Each fill trigger will use completely random values)

  • Fill columns from the same row: When filling multiple fields at once, Fake Data will pick a random row from Dataset and will use columns from that same row:
First NameLast NameEmail
JaunitaRohan[email protected]
AnnettaFerry[email protected]
KarliStokes[email protected]
LilianeJohns[email protected]
CarmelHauck[email protected]
TerenceHarris[email protected]
AbnerQuigley[email protected]
PriscillaZemlak[email protected]
CorbinBins[email protected]
(Each fill trigger will pick a random row, and use the columns from that row)

Row pick setting

These setting is available once you choose Fill columns from the same row from the previous setting, and will configure how rows are picked for each fill trigger.

  • Pick a random row for each fill: For each fill, Fake Data will always pick a random row. Below is an example of how rows may be picked for multiple fill triggers:
First NameLast NameEmail
JaunitaRohan[email protected]
AnnettaFerry[email protected]
KarliStokes[email protected]
LilianeJohns[email protected]
CarmelHauck[email protected]
TerenceHarris[email protected]
AbnerQuigley[email protected]
PriscillaZemlak[email protected]
CorbinBins[email protected]
(Each fill trigger will pick a random row)
  • Rotate rows in consecutive order: When filling multiple fields at once, Fake Data will pick rows in a consecutive order. Once the last row is reached, it will start again from the beginning.
First NameLast NameEmail
JaunitaRohan[email protected]
AnnettaFerry[email protected]
KarliStokes[email protected]
LilianeJohns[email protected]
CarmelHauck[email protected]
TerenceHarris[email protected]
AbnerQuigley[email protected]
PriscillaZemlak[email protected]
CorbinBins[email protected]
(Each fill trigger will pick the next row)