sei-models/macros/streamline/streamline_udfs.sql
Ryan-Loofy 1cfa0d3b5e
Sei txs, blocks, tx count pipeline (#2)
* Sei txs, blocks, tx count pipeline

* Streamline sei pipelines

- XXX will be deleted with PROD deployment after approvals
- Temp file will be deleted after UDFs are created

* Add requirement and update block_number to block_id

* Switch to block number

* Remove old sources

* Update loads and run times

* Add prod integration
2023-08-29 12:26:28 -04:00

20 lines
891 B
SQL

{% macro create_udf_get_chainhead() %}
CREATE
OR REPLACE EXTERNAL FUNCTION streamline.udf_get_chainhead() returns variant api_integration =
{% if target.name == "prod" %}
aws_sei_api AS 'https://v19hb3dk4k.execute-api.us-east-1.amazonaws.com/prod/get_chainhead'
{% else %}
aws_sei_api_dev AS 'https://u1hda5gxml.execute-api.us-east-1.amazonaws.com/dev/get_chainhead'
{%- endif %};
{% endmacro %}
{% macro create_udf_bulk_json_rpc() %}
CREATE
OR REPLACE EXTERNAL FUNCTION streamline.udf_bulk_json_rpc(
json variant
) returns text api_integration = {% if target.name == "prod" %}
aws_sei_api AS 'https://v19hb3dk4k.execute-api.us-east-1.amazonaws.com/prod/udf_bulk_json_rpc'
{% else %}
aws_sei_api_dev AS 'https://u1hda5gxml.execute-api.us-east-1.amazonaws.com/dev/udf_bulk_json_rpc'
{%- endif %};
{% endmacro %}