Trillo Workbench Lessons
  • Introduction
    • Sample Application
  • Introduction to Lessons
    • IDE Lessons
    • Annotated Directory Structure
  • New classes using workbench UI
  • Save many records into tables using the workbench UI
  • New function using Workbench UI
  • Introduction to Code Lessons
    • Anatomy of Trillo Function
  • Begin Code Lessons
    • Paginated list
    • Pagination using SQL Query
    • DataIterator
    • Read file from cloud storage bucket
    • Generating signed URL for a file download
    • Import a CSV file from bucket into BigQuery
    • Query a dataset of BigQuery
    • Using an Document AI Processor
    • Chat using GenAI
    • Function calling another function
    • Accessing Runtime Context
    • Write a workflow (pipeline for data processing)
  • Appendixes
    • ServerlessFunction
    • Map, List and Tree
    • Logs and Audit Logs
    • DataRequest Class
    • DataResponse Class
    • DataIterator Class
    • Result
Powered by GitBook
On this page
  • Code location in repo: /lessons/Save_many_records_using_WB_UI

Save many records into tables using the workbench UI

PreviousNew classes using workbench UINextNew function using Workbench UI

Last updated 1 year ago

In this exercise we will add a few records to each of the tables created above by invoicing API using Trillo Workbench. In normal development, you will invoke these APIs from a client program after reading a file from the source system such as a file or API.

Code location in repo: /lessons/Save_many_records_using_WB_UI

  1. After creating the Customer table in the previous steps, navigate to the table.

  2. Access the "API" section and select the "Save Many" endpoint.

  1. Enter the data in the request body as an array of JSON objects for insertion. For example:

[ 
  {
    "firstName": "Sam",
    "lastName": "Hodar",
    "phone": "+1412772922",
    "email": "sam.hodar@example.com"
  }
]
  1. Click on the "Test" button. In the response, check the status of each record. If "inserted": true is present, the record was successfully inserted.

  1. Repeat the same process for the Order and LineItem tables, following the steps mentioned above for each table.