{"id":18732492,"url":"https://github.com/metrico/clickhouse-udf-node","last_synced_at":"2026-05-02T01:34:59.250Z","repository":{"id":115480535,"uuid":"458858167","full_name":"metrico/clickhouse-udf-node","owner":"metrico","description":"Example NodeJS UDF for Clickhouse","archived":false,"fork":false,"pushed_at":"2022-02-13T21:44:45.000Z","size":16,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-19T23:08:39.654Z","etag":null,"topics":["clickhouse","cloki","javascript","node","nodejs","udf","user-defined-function"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-13T16:02:24.000Z","updated_at":"2024-10-24T16:39:29.000Z","dependencies_parsed_at":"2023-03-13T13:02:17.436Z","dependency_job_id":null,"html_url":"https://github.com/metrico/clickhouse-udf-node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/metrico/clickhouse-udf-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fclickhouse-udf-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fclickhouse-udf-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fclickhouse-udf-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fclickhouse-udf-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metrico","download_url":"https://codeload.github.com/metrico/clickhouse-udf-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fclickhouse-udf-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32520156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"ssl_error","status_checked_at":"2026-05-02T01:12:54.261Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","cloki","javascript","node","nodejs","udf","user-defined-function"],"created_at":"2024-11-07T15:06:25.472Z","updated_at":"2026-05-02T01:34:59.244Z","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 UDF\nThis basic example illustrates a simple `sum` NodeJS powered Clickhouse UDF function\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\u003cbr\u003e\u003cbr\u003e\n\n### NodeJS Function\nCreate an [executable NodeJS script](https://github.com/metrico/clickhouse-udf-node/blob/main/node-udf-sum.js)\n- read input from stdin\n- split row values by tabs\n- return some output\n\n\u003e In our example we'll just accept two integers and sum them\n\n### ClickHouse UDF\nConfigure a [UDF Function](https://github.com/metrico/clickhouse-udf-node/blob/main/node_function.xml) to invoke your script \n- use directory `/var/lib/clickhouse/user-scripts` to store user-scripts\n\n### Use UDF\n```\nSELECT node_sum(10, 20)\n\nQuery id: f98a5f83-4e94-41d0-9d9f-78b37d3af152\n\n┌─node_sum(10, 20)-─┐\n│                30 │\n└───────────────────┘\n\n1 rows in set. Elapsed: 0.054 sec. \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrico%2Fclickhouse-udf-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetrico%2Fclickhouse-udf-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrico%2Fclickhouse-udf-node/lists"}