Skip to content

Commit 4b36f51

Browse files
committed
doc: add sql
1 parent 786188f commit 4b36f51

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/enterprise.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ Here are some code examples in various programming languages that rely mainly on
119119
--8<--
120120
```
121121

122+
=== "SQL/Athena"
123+
```{.sql linenums="1"}
124+
--8<--
125+
./enterprise/hmac_.sql
126+
--8<--
127+
```
128+
122129
!!! tip "Want more?"
123130
Don't see your favorite language here? [Just ask us :angel:](mailto:support@image-charts.com) !
124131

docs/enterprise/hmac_.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
with query_string as (select * from (VALUES 'chd=t1:10,40,60,80,30,20|60,40,50,100,20,30&chs=999x600&cht=bvs&chxl=0:|Jan|Mar|Apr|May|Jun|Jul&chxt=x,y&chf=b0,lg,90,03a9f4,0,3f51b5,1&chm=D,03a9f4,1,0,5,1&icac=MY_ACCOUNT_ID') as t(qs))
2+
select concat('https://image-charts.com/chart?', qs, '&ichm=', lower(to_hex(hmac_sha256(to_utf8(qs), to_utf8('MY_SECRET_KEY'))))) from query_string;

0 commit comments

Comments
 (0)