mirror of
https://github.com/FlipsideCrypto/livequery-base.git
synced 2026-02-06 11:16:44 +00:00
remove marketplace macros
This commit is contained in:
parent
4c3e3f326a
commit
2e821cb0f7
@ -1,4 +1,4 @@
|
||||
{% set schema = "strangelove" %}
|
||||
{# {% set schema = "strangelove" %}
|
||||
{% set config = fromyaml(config_strangelove_udfs(schema_name = schema, utils_schema_name = "quicknode_utils")) %}
|
||||
{% set raw_test_queries %}
|
||||
strangelove.get:
|
||||
@ -42,4 +42,4 @@ _____
|
||||
{% if item["return_type"][0] != "VARIANT"%}
|
||||
{{ item["return_type"][0] }}
|
||||
{% endif %}
|
||||
{% endfor %} #}
|
||||
{% endfor %} #} #}
|
||||
@ -1,3 +0,0 @@
|
||||
{{crud_udfs_by_chain(config_evm_high_level_abstractions, 'ethereum', 'mainnet', false)}}
|
||||
{{- crud_udfs_by_chain(config_evm_rpc_primitives, "ethereum", None, False) -}}
|
||||
{{- crud_udfs_by_chain(config_evm_rpc_primitives, "ethereum", None, true) -}}
|
||||
@ -34,20 +34,12 @@ models:
|
||||
+enabled: '{{ true if env_var("ENABLE_SNOWFLAKE_SECRETS", "") else false }}'
|
||||
evm:
|
||||
+tags: evm
|
||||
marketplace:
|
||||
+tags: marketplace
|
||||
|
||||
tests:
|
||||
+store_failures: true # all tests
|
||||
livequery_models:
|
||||
deploy:
|
||||
marketplace:
|
||||
blockpour:
|
||||
# TODO: enable tests for blockpour once we get an API key
|
||||
+enabled: false
|
||||
|
||||
|
||||
seeds:
|
||||
+enabled: "{{ target.name not in ['livequery', 'livequery_dev'] }}"
|
||||
+enabled: "{{ target.database not in ['livequery', 'livequery_dev'] }}"
|
||||
|
||||
on-run-start:
|
||||
- "{{ create_sps() }}"
|
||||
@ -67,8 +59,8 @@ vars:
|
||||
UPDATE_UDFS_AND_SPS: false
|
||||
DROP_UDFS_AND_SPS: false
|
||||
UPDATE_SNOWFLAKE_TAGS: true
|
||||
STREAMLINE_INVOKE_STREAMS: False
|
||||
STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES: False
|
||||
STREAMLINE_INVOKE_STREAMS: false
|
||||
STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES: false
|
||||
STUDIO_TEST_USER_ID: '{{ env_var("STUDIO_TEST_USER_ID", "98d15c30-9fa5-43cd-9c69-3d4c0bb269f5") }}'
|
||||
|
||||
API_INTEGRATION: '{{ var("config")[target.name]["API_INTEGRATION"] }}'
|
||||
|
||||
@ -117,36 +117,6 @@
|
||||
{%- endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{% macro crud_udfs_by_marketplace(config_func, schema, utility_schema, drop_) %}
|
||||
{#
|
||||
Generate create or drop statements for a list of udf configs for a given blockchain and network
|
||||
|
||||
config_func: function that returns a list of udf configs
|
||||
schema: schema name
|
||||
utility_schema: utility schema name
|
||||
#}
|
||||
CREATE SCHEMA IF NOT EXISTS {{ schema }};
|
||||
{%- set configs = fromyaml(config_func(schema, utility_schema)) if utility_schema else fromyaml(config_func(schema, schema)) -%}
|
||||
{%- for udf in configs -%}
|
||||
{{- create_or_drop_function_from_config(udf, drop_=drop_) -}}
|
||||
{%- endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{% macro crud_marketplace_udfs(config_func, schemaName, base_api_schema_name, drop_) %}
|
||||
{#
|
||||
Generate create or drop statements for a list of udf configs for a given schema and api
|
||||
|
||||
config_func: function that returns a list of udf configs
|
||||
schemaName: the target schema to build the udfs
|
||||
base_api_schema_name: the schema that contains base api functions
|
||||
drop_: whether to drop or create the udfs
|
||||
#}
|
||||
{%- set udfs = fromyaml(config_func(schemaName, base_api_schema_name)) -%}
|
||||
{%- for udf in udfs -%}
|
||||
{{- create_or_drop_function_from_config(udf, drop_=drop_) -}}
|
||||
{%- endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{% macro ephemeral_deploy_core(config) %}
|
||||
{#
|
||||
This macro is used to deploy functions using ephemeral models.
|
||||
@ -190,26 +160,4 @@
|
||||
SELECT '{{ model.schema }}' as schema_
|
||||
{%- endmacro -%}
|
||||
|
||||
{% macro ephemeral_deploy_marketplace(configs) %}
|
||||
{#
|
||||
This macro is used to deploy functions using ephemeral models.
|
||||
It should only be used within an ephemeral model.
|
||||
#}
|
||||
{%- set schema = this.schema -%}
|
||||
{%- set utility_schema = this.identifier -%}
|
||||
{% if execute and (var("UPDATE_UDFS_AND_SPS") or var("DROP_UDFS_AND_SPS")) and model.unique_id in selected_resources %}
|
||||
{% set sql %}
|
||||
{% for config in configs %}
|
||||
{{- crud_udfs_by_marketplace(config, schema, utility_schema, var("DROP_UDFS_AND_SPS")) -}}
|
||||
{%- endfor -%}
|
||||
{%- endset -%}
|
||||
{%- if var("DROP_UDFS_AND_SPS") -%}
|
||||
{%- do log("Drop marketplace udfs: " ~ this.database ~ "." ~ schema, true) -%}
|
||||
{%- else -%}
|
||||
{%- do log("Deploy marketplace udfs: " ~ this.database ~ "." ~ schema, true) -%}
|
||||
{%- endif -%}
|
||||
{%- do run_query(sql ~ apply_grants_by_schema(schema)) -%}
|
||||
{%- endif -%}
|
||||
SELECT '{{ model.schema }}' as schema_
|
||||
{%- endmacro -%}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user