Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
juls858 committed Dec 19, 2023
1 parent e6e6b60 commit 5034984
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions models/live__allow_list.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
grants = {'+select': fromyaml(var('ROLES'))}
) }}

select
'*.' || t.value as ALLOWED_DOMAINS
from table(flatten(input=>{{ this.database }}.live.udf_allow_list())) t
order by
split_part(ALLOWED_DOMAINS, '.', -1)
,split_part(ALLOWED_DOMAINS, '.', -2)
,split_part(ALLOWED_DOMAINS, '.', -3)
SELECT '*.' || t.value AS allowed_domains
FROM table(flatten(input => {{ this.database }}.live.udf_allow_list())) AS t
ORDER BY
split_part(allowed_domains, '.', -1),
split_part(allowed_domains, '.', -2),
split_part(allowed_domains, '.', -3)

0 comments on commit 5034984

Please sign in to comment.