mirror of
https://github.com/FlipsideCrypto/bsc-models.git
synced 2026-02-06 17:31:44 +00:00
* added the bsc streamline * updated * added the streamline models with the github actions * remove credential * remove credential * removed user yaml * updated profile to prod * update * tune the parameters * tune the parameters * updated * updated
23 lines
488 B
PL/PgSQL
23 lines
488 B
PL/PgSQL
{% macro create_udtf_get_base_table(schema) %}
|
|
CREATE
|
|
OR REPLACE FUNCTION {{ schema }}.udtf_get_base_table(
|
|
max_height INTEGER
|
|
) returns TABLE (
|
|
height NUMBER
|
|
) AS $$ WITH base AS (
|
|
SELECT
|
|
ROW_NUMBER() over (
|
|
ORDER BY
|
|
SEQ4()
|
|
) AS id
|
|
FROM
|
|
TABLE(GENERATOR(rowcount => 100000000))
|
|
)
|
|
SELECT
|
|
id AS height
|
|
FROM
|
|
base
|
|
WHERE
|
|
id <= max_height $$;
|
|
{% endmacro %}
|