Skip to content

Commit a8bbca1

Browse files
authored
Update README.md
1 parent 0bcdaf6 commit a8bbca1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ Once installed, the [macro functions](https://community-extensions.duckdb.org/ex
3030
Here's a random example out of 100s using the `IPv4StringToNum` and `IPv4NumToString` functions:
3131

3232
```sql
33+
--- Install and load chsql
3334
D INSTALL chsql FROM community;
3435
D LOAD chsql;
36+
37+
--- Use any of the 100+ ClickHouse Macros
3538
D SELECT IPv4StringToNum('127.0.0.1'), IPv4NumToString(2130706433);
3639
┌──────────────────────────────┬─────────────────────────────┐
3740
│ ipv4stringtonum('127.0.0.1') │ ipv4numtostring(2130706433) │
@@ -45,6 +48,15 @@ D SELECT IPv4StringToNum('127.0.0.1'), IPv4NumToString(2130706433);
4548
The built-in `ch_scan` function can be used to query remote ClickHouse servers using the HTTP/s API
4649

4750
```sql
51+
--- Set optional X-Header Authentication
52+
D CREATE SECRET extra_http_headers (
53+
TYPE HTTP,
54+
EXTRA_HTTP_HEADERS MAP{
55+
'X-ClickHouse-User': 'user',
56+
'X-ClickHouse-Key': 'password'
57+
}
58+
);
59+
--- Query using the HTTP API
4860
D SELECT * FROM ch_scan("SELECT number * 2 FROM numbers(10)", "https://play.clickhouse.com");
4961
```
5062

0 commit comments

Comments
 (0)