Ask AI
Skip to main content

Create bulk data

Function: Create bulk data

This function allows you to efficiently add a large number of new records to your database all at once. It's perfect for situations where you have a list of information (like from a spreadsheet or another system) that you want to store in your application's database without having to create each record individually.

Input

  • Data (List of values): This is the collection of records you want to add. Each item in this list should represent a single new record and contain all the necessary information, structured according to your chosen Data Schema.
  • Data schema (Database table or data transfer object): This specifies the blueprint or structure for the data you are creating. You must select an existing Data Schema that defines the fields and types of information for your new records.
  • Name (List of attributes): This setting helps identify each new record. You select one or more attributes (fields) from your chosen Data Schema. The values from these attributes in each record will be combined to form a display name for that record within your application.
    • Attribute (Single attribute of a Data Schema): Choose a specific field from your selected Data Schema. The value of this field will be used as part of the record's display name. You can add multiple attributes to create a more descriptive name (e.g., combining "First Name" and "Last Name").

Output

This function does not return a direct output value. Instead, its successful execution results in new data records being created and stored in your application's database.

Execution Flow

Real-Life Examples

Example 1: Importing a list of new products

  • Scenario: You've received a new catalog of products from a supplier in a spreadsheet, and you want to add them all to your online store's product database.
  • Inputs:
    • Data: A list of objects, where each object represents a product with fields like \{"ProductName": "Laptop Pro", "SKU": "LP-001", "Price": 1200, "Category": "Electronics"\}.
    • Data schema: "Products" (your existing data schema for products).
    • Name: "ProductName" (you select the "ProductName" attribute to be the display name for each product).
  • Result: All products from your list are added to the "Products" database table. Each product will be identified by its product name (e.g., "Laptop Pro").

Example 2: Adding multiple new users from a registration form

  • Scenario: A recent event generated a list of new sign-ups, and you need to add them as users to your application's user management system.
  • Inputs:
    • Data: A list of objects, where each object represents a user with fields like \{"FirstName": "Alice", "LastName": "Smith", "Email": "alice.s@example.com", "Role": "Customer"\}.
    • Data schema: "Users" (your existing data schema for users).
    • Name: "FirstName", "LastName" (you select both "FirstName" and "LastName" attributes to form the display name, e.g., "Alice Smith").
  • Result: All new sign-ups are created as user records in the "Users" database table. Each user will be identified by their full name.

Example 3: Creating a batch of customer orders

  • Scenario: You're processing offline orders received via phone, and you want to quickly enter them into your order management system in bulk.
  • Inputs:
    • Data: A list of objects, where each object represents an order with fields like \{"OrderId": "ORD-2023-001", "CustomerId": "CUST-123", "OrderDate": "2023-10-26", "TotalAmount": 150.75, "Status": "Pending"\}.
    • Data schema: "Orders" (your existing data schema for customer orders).
    • Name: "OrderId" (you select the "OrderId" attribute to be the primary identifier for each order).
  • Result: All orders from your list are added to the "Orders" database table. Each order will be easily identifiable by its unique order ID.