Skip to main content

Custom Indexing Framework

The custom indexing framework (sui-indexer-alt-framework) turns raw checkpoint data into database rows through interfaces that you implement. The process() interface transforms the data, commit() stores it in batches, and the optional prune() removes old records based on your retention policy.

What interfaces does the framework provide?​

The framework exposes the following interfaces that you implement to define your data processing logic:

  • process(): Transform raw checkpoint data (transactions, events, object changes) into your desired database rows. This is where you extract meaningful information, filter relevant data, and format it for storage.

  • commit(): Store your processed data to the database with proper transaction handling. The framework calls this with batches of processed data for efficient bulk operations.

  • prune(): Clean up old data based on your retention policies (optional). Useful for managing database size by removing outdated records while preserving recent data. You enable pruning for pipelines configured with a retention policy, which sets how many of the most recent checkpoints the pipeline keeps.

Which pipeline type should you use?​

Sequential and concurrent pipeline types and their trade-offs are detailed in Pipeline Architecture.