Skip to main content
Question

Mock data generator


cecilerx
Forum|alt.badge.img+1
  • Hello Everyone!
    I am looking for a simple and efficient way to generate Mock data of any kind. For example I wanted to test some functionalities with a library base. I want to be able to generate 20 rows ot a data set with the following columns:
     
  • ”book title” with a string data type
  • “authors” with a string data type
  • “Publishing date” with date data type 

And so on… 
I found some stuff here and there but any of them are totally matching my criterias. 

Which tool are you using to do so?

Thanks!

ScottWorld
Forum|alt.badge.img+33

@cecilerx 

I like using Mockaroo for these purposes.

Airtable also offers its Batch Update extension, although it is significantly more limited than Mockaroo.

- ScottWorld, Expert Airtable Consultant


Mike_AutomaticN
Forum|alt.badge.img+21

I usually generate those using ChatGPT.

Mike, Consultant @ Automatic Nation


jakecolling
Forum|alt.badge.img+1

Caret would be an easy way to do this. https://caretai.app/

Happy to help you get started!

 

 


GeorgeMiller12
Forum|alt.badge.img+6

@cecilerx - Great question.

First exciting news is that we have a big AI launch coming this Wednesday (9th April 2025). In this launch there is a feature that aligns perfectly with what you are looking to achieve. These updates are going live at Airtable NYC.

Secondly, I wanted to share a similar workflow I worked on to build out a library using ISBNs. You can use the https://openlibrary.org free API within a script step on Airtable Automations. I have put the script below. You will just need to set an inputConfig variable for “ISBN” and fetch this dynamically from a previous step in the automation.

Hope this helps.
 

// Get the input configuration values
let inputConfig = input.config();
let isbn = inputConfig.isbn; // ISBN input from the trigger

// Fetch book data from Open Library API using the search.json endpoint with all fields
let response = await fetch(`https://openlibrary.org/search.json?isbn=${isbn}&fields=*,availability&limit=1`);
let data = await response.json();

// Log the response for debugging
console.log("Search API response:", JSON.stringify(data, null, 2));

if (data.docs && data.docs.length > 0) {
    let bookInfo = data.docs[0];

    // Fetch additional book details using the work key if available
    let workKey = bookInfo.key;
    let description = "No description available";
    let subjects = [];
    let subject_people = [];
    let subject_places = [];
    let subject_times = [];
    let workDetails = {};
    let editions = [];

    if (workKey) {
        let workResponse = await fetch(`https://openlibrary.org${workKey}.json`);
        let workData = await workResponse.json();

        // Log the work response for debugging
        console.log("Work API response:", JSON.stringify(workData, null, 2));

        description = workData.description ? (typeof workData.description === 'string' ? workData.description : workData.description.value) : "No description available";
        subjects = workData.subjects || [];
        subject_people = workData.subject_people || [];
        subject_places = workData.subject_places || [];
        subject_times = workData.subject_times || [];

        workDetails = {
            title: workData.title || "Unknown",
            subjects: subjects.map(subj => subj.name || subj),
            description: description,
            author: workData.authors ? workData.authors.map(author => author.author.key).join(", ") : "Unknown",
        };

        // Fetch editions of the work
        let editionsResponse = await fetch(`https://openlibrary.org${workKey}/editions.json`);
        let editionsData = await editionsResponse.json();

        // Log the editions response for debugging
        console.log("Editions API response:", JSON.stringify(editionsData, null, 2));

        editions = editionsData.entries.map(edition => ({
            title: edition.title || "Unknown",
            subtitle: edition.subtitle || "Unknown",
            edition: edition.edition_name || "Unknown",
            publisher: edition.publishers ? edition.publishers.join(", ") : "Unknown",
            publish_place: edition.publish_places ? edition.publish_places.join(", ") : "Unknown",
            publish_date: edition.publish_date || "Unknown",
            pagination: edition.pagination || "Unknown",
            number_of_pages: edition.number_of_pages || 0,
            isbn: edition.isbn_13 ? edition.isbn_13.join(", ") : edition.isbn_10 ? edition.isbn_10.join(", ") : "Unknown",
            language: edition.languages ? edition.languages.map(lang => lang.key).join(", ") : "Unknown",
            series: edition.series ? edition.series.join(", ") : "Unknown",
            notes: edition.notes || "None",
            cover_image: edition.covers ? edition.covers.map(cover => `https://covers.openlibrary.org/b/id/${cover}-L.jpg`).join(", ") : "",
        }));
    }

    let bookDetails = {
        key: bookInfo.key || "Unknown",
        redirects: bookInfo.redirects || [],
        title: bookInfo.title || "Unknown",
        subtitle: bookInfo.subtitle || "Unknown",
        alternative_title: bookInfo.alternative_title || "Unknown",
        alternative_subtitle: bookInfo.alternative_subtitle || "Unknown",
        cover_i: bookInfo.cover_i ? `https://covers.openlibrary.org/b/id/${bookInfo.cover_i}-L.jpg` : "",
        ebook_access: bookInfo.ebook_access || "Unknown",
        edition_count: bookInfo.edition_count || 0,
        edition_key: bookInfo.edition_key || [],
        format: bookInfo.format || "Unknown",
        by_statement: bookInfo.by_statement || "Unknown",
        publish_date: bookInfo.publish_date ? bookInfo.publish_date.join(", ") : "Unknown",
        lccn: bookInfo.lccn || [],
        ia: bookInfo.ia || [],
        oclc: bookInfo.oclc || [],
        isbn: bookInfo.isbn || [],
        contributor: bookInfo.contributor || [],
        publish_place: bookInfo.publish_place || [],
        publisher: bookInfo.publisher || [],
        first_sentence: bookInfo.first_sentence || "Unknown",
        author_key: bookInfo.author_key || ["Unknown ID"],
        author_name: bookInfo.author_name || ["Unknown"],
        author_alternative_name: bookInfo.author_alternative_name || [],
        subject: subjects.map(subj => subj.name || subj),
        person: subject_people.map(person => person.name || person),
        place: subject_places.map(place => place.name || place),
        time: subject_times.map(time => time.name || time),
        has_fulltext: bookInfo.has_fulltext || false,
        title_suggest: bookInfo.title_suggest || "Unknown",
        publish_year: bookInfo.publish_year || [],
        language: bookInfo.language || [],
        number_of_pages_median: bookInfo.number_of_pages_median || 0,
        ia_count: bookInfo.ia_count || 0,
        publisher_facet: bookInfo.publisher_facet || [],
        author_facet: bookInfo.author_facet || [],
        first_publish_year: bookInfo.first_publish_year || 0,
        ratings_count: bookInfo.ratings_count || 0,
        readinglog_count: bookInfo.readinglog_count || 0,
        want_to_read_count: bookInfo.want_to_read_count || 0,
        currently_reading_count: bookInfo.currently_reading_count || 0,
        already_read_count: bookInfo.already_read_count || 0,
        subject_key: bookInfo.subject_key || [],
        person_key: bookInfo.person_key || [],
        place_key: bookInfo.place_key || [],
        time_key: bookInfo.time_key || [],
        lcc: bookInfo.lcc || [],
        ddc: bookInfo.ddc || [],
        lcc_sort: bookInfo.lcc_sort || "Unknown",
        ddc_sort: bookInfo.ddc_sort || "Unknown",
        description: description,
        work_details: workDetails,
        editions: editions
    };

    // Output the book details
    output.set('bookDetails', bookDetails);
} else {
    console.log("No information found for this ISBN.");
    output.set('bookDetails', null);
}

 


MilhoanDesign
Forum|alt.badge.img+4

Just use GhatGPT and ask it to create a table in .csv format with Book Title, Authors, and Publishing Data as the header row and ask it to produce x number of rows of fictitious data. It will work perfectly. 


hello_ipsally
Forum|alt.badge.img+2

For quick simple lists like names and emails Mockaroo is the fastest, however Mockaroo secretly starts repeating the same names and emails if you are generating a lot of data.

 

For more specific lists, ChatGPT can refine the random dataset so you can control the theme of your data like list of Fictional Startup Companies in ABCDE industries, and just list a bunch of headers and data types.


Reply