ClickHouse + URLEng

ClickHouse + URLEng

Using URLEng with ClickHouse Clients

Serverless ClickHouse URL Engine

πŸ‘‡ Ready? Get your own table in zero minutes ⏱️

You're about to create your very own serverless, storage persistent URL Engine table - fast, free and always accessible from anywhere. Since there are no logins or signups, all data is hidden in public. The only protection is your own secret URL path.

Choose a unique URL path

We will use the ClickHouse URL Engine to query data to/from our service.

  • Open your ClickHouse client
  • Choose your unique URL path

Replace mY5uPeRs3Cre7tok3N with your Token!

To avoid typing this every time, we'll store our URL as a variable

:) SET param_url = ''


It's time to insert some data.

The serverless table will automatically adapt to the schema inserts.

:) INSERT INTO FUNCTION url({url:String}, JSONEachRow, 'key String, value UInt64') VALUES ('hello', 1)


Let's read our data back and apply some logic for fun.

Note due to how ClickHouse works, the full table gets read each time.

:) SELECT * FROM url({url:String}, JSONEachRow)


If you plan on using the data frequently, you can create a persistent URL Engine table.

Choose any schema, too.

:) CREATE TABLE default.url_engine_distributed
 `key` String,
 `value` UInt64,
 ENGINE = URL('', 'JSONEachRow')

:) INSERT INTO url_engine_distributed VALUES ('hello', 1), ('world', 2)
:) SELECT * FROM url_engine_distributed

β”‚ hello β”‚ 1 β”‚
β”‚ world β”‚ 2 β”‚

2 rows in set. Elapsed: 0.185 sec.


You can expire data by using or adding an __expires key/column with a future unix timestamp.

:) INSERT INTO FUNCTION url({url:String}, JSONEachRow, 'key String, value UInt64, __expires UInt64')
   VALUES ('hello', 1, toUnixTimestamp(now()+300))


No server? Get your table data in/out of your table using clickhouse-local

clickhouse-local -q "select count() from url('', JSONEachRow)"


Last but not least, data can be inserted and accessed through curl or any other HTTP GET/POST capable client.

POST ndjson

curl -s -XPOST 'Content-Type:application/x-ndjson' --data-binary @ndjson.txt

POST json

curl -X POST 'Content-Type: application/json' -d '[{"key":"curl","value":1}]'

GET json

curl -X GET

That's it

Enjoy your free, bottomless URL table! Use it to share small datasets, states, k/vs and anything you can think of between your nodes as if they were a distributed cluster.

πŸ’¬ Found a problem? Got some feedback or ideas? Please open an Issue or start a Discussion in our community