{"id":18732497,"url":"https://github.com/metrico/clickhouse-node-url-engine","last_synced_at":"2025-04-12T18:31:13.723Z","repository":{"id":45812706,"uuid":"461328369","full_name":"metrico/clickhouse-node-url-engine","owner":"metrico","description":"Example NodeJS URL Engine for Clickhouse","archived":false,"fork":false,"pushed_at":"2022-02-21T10:02:09.000Z","size":19,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T12:51:09.693Z","etag":null,"topics":["clickhouse","example","insert","node","select","server","url-engine"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metrico.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-19T22:27:53.000Z","updated_at":"2022-10-27T11:10:07.000Z","dependencies_parsed_at":"2022-07-24T22:32:01.435Z","dependency_job_id":null,"html_url":"https://github.com/metrico/clickhouse-node-url-engine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fclickhouse-node-url-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fclickhouse-node-url-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fclickhouse-node-url-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fclickhouse-node-url-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metrico","download_url":"https://codeload.github.com/metrico/clickhouse-node-url-engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248613324,"owners_count":21133492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clickhouse","example","insert","node","select","server","url-engine"],"created_at":"2024-11-07T15:06:26.131Z","updated_at":"2025-04-12T18:31:13.391Z","avatar_url":"https://github.com/metrico.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://user-images.githubusercontent.com/1423657/147935343-598c7dfd-1412-4bad-9ac6-636994810443.png\" width=220 \u003e\n\n# ClickHouse NodeJS URL Engine\nThis basic example illustrates a simple NodeJS [URL Table Engine](https://clickhouse.com/docs/en/engines/table-engines/special/url/) server for Clickhouse\n\n##### ⏱️ Why\n\u003e Clickhouse is super fast and already has all the functions one could dream. What is this for?\n\nThis example is designed to understand the underlying formats and unleash imagination for integrators.\n\n```mermaid\nsequenceDiagram\n    autonumber\n    ClickHouse-\u003e\u003eNodeJS: POST Request\n    loop Javascript\n        NodeJS-\u003e\u003eNodeJS: INSERT\n    end\n    NodeJS--\u003e\u003eClickHouse: POST Response\n    ClickHouse-\u003e\u003eNodeJS: GET Request\n    loop Javascript\n        NodeJS-\u003e\u003eNodeJS: SELECT\n    end\n    NodeJS--\u003e\u003eClickHouse: GET Response\n```\n\n##### Features\n- [x] INSERT to JS array\n- [x] SELECT from JS array\n\n#### Setup\nInstall and run the example service :\n```\nnpm install\nnpm start\n```\n\n#### 📦 Clickhouse\nCreate a `url_engine_table` table pointed at our service :\n```sql\nCREATE TABLE url_engine_node\n(\n    `key` String,\n    `value` UInt64\n)\nENGINE = URL('http://127.0.0.1:3123/', JSONEachRow)\n```\n \n ##### ▶️ INSERT\n ```sql\n INSERT INTO url_engine_node VALUES ('hello',1), ('world', 2)\n ```\n ##### ◀️ SELECT\n ```sql\nSELECT * FROM url_engine_node\n\nQuery id: d65b429e-76aa-49f3-b376-ebd3fbc9cd1a\n\n┌─key───┬─value─┐\n│ hello │     1 │\n│ world │     2 │\n└───────┴───────┘\n\n2 rows in set. Elapsed: 0.005 sec. \n ```\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrico%2Fclickhouse-node-url-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetrico%2Fclickhouse-node-url-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrico%2Fclickhouse-node-url-engine/lists"}