mirror of
https://github.com/FlipsideCrypto/polygon-models.git
synced 2026-02-06 16:46:47 +00:00
* Receipts and traces generic models * Update .github/workflows/dbt_run_streamline_traces_receipts_history.yml Co-authored-by: Julius Remigio <14811322+juls858@users.noreply.github.com> * Rename routes + other updates --------- Co-authored-by: Julius Remigio <14811322+juls858@users.noreply.github.com>
26 lines
757 B
SQL
26 lines
757 B
SQL
{% macro create_udfs() %}
|
|
{% if var("UPDATE_UDFS_AND_SPS") %}
|
|
{% set sql %}
|
|
CREATE schema if NOT EXISTS silver;
|
|
{{ create_js_hex_to_int() }};
|
|
{{ create_udf_hex_to_int(
|
|
schema = "public"
|
|
) }}
|
|
{{ create_udtf_get_base_table(
|
|
schema = "streamline"
|
|
) }}
|
|
|
|
{% endset %}
|
|
{% do run_query(sql) %}
|
|
{% if target.database != "POLYGON_COMMUNITY_DEV" %}
|
|
{% set sql %}
|
|
{{ create_udf_get_chainhead() }}
|
|
{{ create_udf_get_blocks() }}
|
|
{{ create_udf_get_transactions() }}
|
|
{{ create_udf_bulk_json_rpc() }}
|
|
|
|
{% endset %}
|
|
{% do run_query(sql) %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endmacro %} |