A Flatfile plugin that generates example records using Faker
npm i @flatfile/plugin-import-faker
The @flatfile/plugin-import-faker
plugin generates example records using Faker.js. It provides an efficient and flexible way to create large numbers of realistic sample records based on your sheet configuration.
Event Type:
job:ready
The fakerImport
function accepts a configuration object with the following properties:
job
(string): The operation name to listen for in the job:ready event.count
(number): The number of records to generate (default: 1000).batchSize
(number): The number of records to generate in each batch (default: 1000).To install the plugin, run the following command in your project directory:
npm install @flatfile/plugin-import-faker
import { FlatfileListener } from '@flatfile/listener';
import { fakerPlugin } from '@flatfile/plugin-import-faker';
export default function (listener: FlatfileListener) {
listener.use(fakerPlugin({ job: 'sheet:generateExampleRecords' }))
}