mirror of
https://github.com/FlipsideCrypto/polygon-models.git
synced 2026-02-06 11:06:46 +00:00
* Polygon Overhaul - Update DBT models to match streamline optimizations - Standardization - Added more recent DBT optimizations * Add livequery infra * Add PROD integration
22 lines
1006 B
SQL
22 lines
1006 B
SQL
{% macro create_aws_polygon_api() %}
|
|
{{ log(
|
|
"Creating integration for target:" ~ target
|
|
) }}
|
|
|
|
{% if target.name == "prod" %}
|
|
{% set sql %}
|
|
CREATE api integration IF NOT EXISTS aws_polygon_api api_provider = aws_api_gateway api_aws_role_arn = 'arn:aws:iam::490041342817:role/polygon-api-prod-rolesnowflakeudfsAF733095-9hTxS6yYCWlj' api_allowed_prefixes = (
|
|
'https://p6dhi5vxn4.execute-api.us-east-1.amazonaws.com/prod/'
|
|
) enabled = TRUE;
|
|
{% endset %}
|
|
{% do run_query(sql) %}
|
|
{% elif target.name == "dev" %}
|
|
{% set sql %}
|
|
CREATE api integration IF NOT EXISTS aws_polygon_api_dev api_provider = aws_api_gateway api_aws_role_arn = 'arn:aws:iam::490041342817:role/polygon-api-dev-rolesnowflakeudfsAF733095-10H2D361D3DJD' api_allowed_prefixes = (
|
|
'https://rzyjrd54s6.execute-api.us-east-1.amazonaws.com/dev/'
|
|
) enabled = TRUE;
|
|
{% endset %}
|
|
{% do run_query(sql) %}
|
|
{% endif %}
|
|
{% endmacro %}
|