flow-models/macros/udf_address_array_adj.sql
Jack Forgash 792f11599f
AN-3903/Migration Reorg (#196)
* txs final and upd streamline tests w 1 hr inserted timestamp buffer

* copy silver models into silver_cw dir

* txs final, events model, curated model _s copies

* add pending col to txs final

* test config for pending_result_response

* add coalesce to tx id in txs final

* rem tests on inserted timestamp

* uppercase gap test vars

* add retry for null block timestamp and del mainnet23 filter from events

* address adj append 0x, add network ver to blocks, etc

* upd coalesce on events data

* saving event migration test, disabled

* req changes

* upd txs final ingested logic
2023-10-10 13:24:43 -06:00

17 lines
384 B
PL/PgSQL

{% macro run_create_address_array_adj() %}
{% set sql %}
create or replace function {{ target.database }}.silver.udf_address_array_adj(address_list ARRAY)
returns array
language python
runtime_version = '3.9'
handler = 'address_array_adj'
AS
$$
def address_array_adj(addresses):
return ["0x" + addr for addr in addresses]
$$
;
{% endset %}
{% do run_query(sql) %}
{% endmacro %}