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
  1. Begin Code Lessons

Paginated list

This lesson demonstrates how to access a large table using a paginated list

PreviousBegin Code LessonsNextPagination using SQL Query

Last updated 1 year ago

Code: /lessons/

Steps

  1. This lesson uses the Customer table created above.

  2. Select Customer table > API tab > /api/v1.1/data/page API.

  3. Exercise API with default parameters.

  4. See the list of customers in the result section

  5. Next steps are using the Trillo Function. Since you will be writing code using Java, you may want to keep the open.

  6. Create a function using IDE or WB UI.

  7. Write code using DSApi.getPage api.

  • DSApi.getPage takes DataRequest as a parameter.

  • Initialize DataRequest. (see appendix for its definition).

  • Iterate through pages until all records (or N number of records) are read.

  • Add a few log statements to print results. (see appendix for info on logs).

  1. Execute function

  2. Review response

Similar Concepts

Concept

Description

Several retrieve APIs of DSApi

There are APIs to retrieve a single or collection of records. The collection of records may also have nested related objects making it a tree data structure.

Paginated_list
Trillo Workbench Java SDK