
Co-Founder and CEO at QXIP, makers of HOMER, HEPIC, QRYN and contributors to many other OSS projects in the monitoring and observability space
Search for a command to run...

Co-Founder and CEO at QXIP, makers of HOMER, HEPIC, QRYN and contributors to many other OSS projects in the monitoring and observability space
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.
We will use the ClickHouse URL Engine to query data to/from our service.
Replace
mY5uPeRs3Cre7tok3Nwith your Token!
To avoid typing this every time, we'll store our URL as a variable
:) SET param_url = 'https://urleng.com/mY5uPeRs3Cre7tok3N'
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('https://urleng.com/mY5uPeRs3Cre7tok3N', 'JSONEachRow')
:) INSERT INTO url_engine_distributed VALUES ('hello', 1), ('world', 2)
:) SELECT * FROM url_engine_distributed
ββkeyβββ¬βvalueβ
β 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('https://urleng.com/mY5uPeRs3Cre7tok3N', JSONEachRow)"
Last but not least, data can be inserted and accessed through curl or any other HTTP GET/POST capable client.
curl -s -XPOST https://urleng.com/mY5uPeRs3Cre7tok3N-H 'Content-Type:application/x-ndjson' --data-binary @ndjson.txt
curl -X POST https://url-engine.metrico.in/mY5uPeRs3Cre7tok3N-H 'Content-Type: application/json' -d '[{"key":"curl","value":1}]'
curl -X GET https://urleng.com/mY5uPeRs3Cre7tok3N
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
π¨π¨π¨
π¨π¨π¨
π₯π¨π¨