mirror of
https://github.com/FlipsideCrypto/ethereum-models.git
synced 2026-02-06 17:06:46 +00:00
* Add data share macro. * modify to run share post hook for each model Co-authored-by: Desmond Hui <desmond@flipsidecrypto.com>
7 lines
340 B
SQL
7 lines
340 B
SQL
{% macro grant_data_share_statement(table_name, resource_type) %}
|
|
{% if target.database == 'ETHEREUM' %}
|
|
GRANT SELECT ON {{ resource_type }} ETHEREUM.CORE.{{ table_name }} TO SHARE "FLIPSIDE_ETHEREUM";
|
|
{% else %}
|
|
select 1; -- hooks will error if they don't have valid SQL in them, this handles that!
|
|
{% endif %}
|
|
{% endmacro %} |