Trivial Pipe
Stream Orca Whirlpool swap instructions from Portal to logger. Use case: Basic data streaming with query builder.Data Flow
Adding Transformer
Extract transaction hashes from instructions. Use case: Transform raw Portal data before logging.Query from Transformer
Build query dynamically in transformer. Use case: Self-contained transformers that specify their own data requirements.Key Distinction: Transformers can operate in two ways:
- Pure transformation (previous example): Only implements
transform()- processes data after the Portal query is executed - Query-aware transformation (this example): Implements both
query()andtransform()- contributes to building the Portal query AND processes the resulting data
query() method, it augments the Portal query before data is fetched, allowing transformers to be self-contained with their data requirements.
