Add Generic Cosmos Pipeline (#23)

This commit is contained in:
Ryan-Loofy 2023-01-12 10:35:13 -05:00 committed by GitHub
parent 9fe928645f
commit 88c3d5adae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -12,6 +12,7 @@
{{ create_udf_get_cosmos_blocks() }}
{{ create_udf_get_cosmos_transactions() }}
{{ create_udf_get_cosmos_validators() }}
{{ create_udf_get_cosmos_generic() }}
{{ create_udf_get_cosmos_chainhead() }}
{% endset %}

View File

@ -31,6 +31,17 @@
{%- endif %};
{% endmacro %}
{% macro create_udf_get_cosmos_generic() %}
CREATE
OR REPLACE EXTERNAL FUNCTION streamline.udf_get_cosmos_generic(
json variant
) returns text api_integration = aws_cosmos_api AS {% if target.name == "prod" %}
'https://dazi3rled6.execute-api.us-east-1.amazonaws.com/prod/bulk_get_cosmos_generic'
{% else %}
'https://z97ik1b2d0.execute-api.us-east-1.amazonaws.com/dev/bulk_get_cosmos_generic'
{%- endif %};
{% endmacro %}
{% macro create_udf_get_cosmos_chainhead() %}
CREATE EXTERNAL FUNCTION IF NOT EXISTS streamline.udf_get_cosmos_chainhead() returns variant api_integration = aws_cosmos_api AS {% if target.name == "prod" %}
'https://dazi3rled6.execute-api.us-east-1.amazonaws.com/prod/get_cosmos_chainhead'