Macros: External Table Views: Decoder Views - 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.
The External Table Views Macros are used to create Bronze level Views and enable more efficient access to External Tables by selecting from snowflake information schemas with a standardized table structure.
streamline_external_table_query_decoder
Usage
This macro constructs a SQL query to select Decoded Logs or Traces data from an external table as a view, and only includes the last 3 days of data by referencing the information_schema.external_table_file_registration_history
table. The results are structured to include partitioning information for further analysis.
fsc_evm.streamline_external_table_query_decoder
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
model |
String | - | Specifies the model name for the external table query decoder. |
Example:
{{ fsc_evm.streamline_external_table_query_decoder(
model='decoded_logs'
) }}
streamline_external_table_fr_query_decoder
Usage
This macro constructs a SQL query to select Decoded Logs or Traces data from an external table as a view, with a focus on full-refresh scenarios by referencing the information_schema.external_table_files
table with no lookback. The results are structured to include partitioning information for further analysis.
fsc_evm.streamline_external_table_fr_query_decoder
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
model |
String | - | Specifies the model name for the external table query decoder. |
Example:
{{ fsc_evm.streamline_external_table_fr_query_decoder(
model='decoded_traces'
) }}