Macros: Streamline Complete Tables: Decoder Complete - FlipsideCrypto/fsc-evm GitHub Wiki
The following macros are intended to be used to create and maintain various models. These macros can be accessed via version >=v1.0.0
of the fsc-evm
package. Please see the fsc-evm
installation instructions in the README for more details on how to access and utilize this macro effectively.
These macros are required to properly implement the Decoded Event Logs and Traces requests, as they prevent re-requesting data that is already "complete" in the Streamline pipeline.
streamline_decoded_complete
Usage
This macro constructs a SQL query to select and process decoded data based on the specified model type. It retrieves block numbers, IDs, and generates surrogate keys for the decoded logs or traces. The query handles both incremental and full refresh scenarios, referencing different tables based on the model type. It also includes timestamps for insertion and modification, along with an invocation ID for tracking.
fsc_evm.streamline_decoded_complete
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
model |
String | - | Specifies the type of model being processed. Acceptable values are: 'decoded_logs' or 'decoded_traces' |
Example:
{{ fsc_evm.streamline_decoded_complete(
model='decoded_logs'
) }}