external-models/macros/streamline/streamline_udfs.sql
eric-laurello 20a1126d5b
AN-5831 bitquery (#91)
Co-authored-by: San Yong <22216004+SanYongxie@users.noreply.github.com>
Co-authored-by: gregoriustanleyy <gstanleytejakusuma@gmail.com>
2025-03-14 13:45:03 -04:00

11 lines
510 B
SQL

{% macro create_udf_bulk_rest_api_v2() %}
CREATE
OR REPLACE EXTERNAL FUNCTION streamline.udf_bulk_rest_api_v2(
json OBJECT
) returns ARRAY {% if target.database == 'EXTERNAL:' -%}
api_integration = aws_external_api_prod AS 'https://zv7a5qfhv9.execute-api.us-east-1.amazonaws.com/prod/udf_bulk_rest_api'
{% else %}
api_integration = aws_external_api_stg_v2 AS 'https://qoupd0givh.execute-api.us-east-1.amazonaws.com/stg/udf_bulk_rest_api'
{%- endif %}
{% endmacro %}