This basic example illustrates a simple NodeJS URL Table Engine server for Clickhouse
Install and run the example server
npm install
npm start
Create a URL Engine table pointed at our service:
CREATE TABLE url_engine_node
(
`key` String,
`value` UInt64
)
ENGINE = URL('http://127.0.0.1:3123/', JSONEachRow)
INSERT INTO url_engine_node VALUES ('hello',1), ('world', 2)
SELECT *
FROM url_engine_node
Query id: d65b429e-76aa-49f3-b376-ebd3fbc9cd1a
┌─key───┬─value─┐
│ hello │ 1 │
│ world │ 2 │
└───────┴───────┘
2 rows in set. Elapsed: 0.005 sec.