{"id":37060841,"url":"https://github.com/davidnx/baby-kusto-csharp","last_synced_at":"2026-01-14T06:53:25.856Z","repository":{"id":43214444,"uuid":"469268687","full_name":"davidnx/baby-kusto-csharp","owner":"davidnx","description":"A self-contained execution engine for the Kusto Query Language (KQL) written in C#","archived":false,"fork":false,"pushed_at":"2023-09-29T05:54:08.000Z","size":796,"stargazers_count":36,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-22T09:35:35.254Z","etag":null,"topics":["azure-data-explorer","data-science","kql","kusto"],"latest_commit_sha":null,"homepage":"","language":"C#","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/davidnx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null}},"created_at":"2022-03-13T04:24:22.000Z","updated_at":"2025-06-12T13:26:12.000Z","dependencies_parsed_at":"2023-09-29T07:11:04.491Z","dependency_job_id":null,"html_url":"https://github.com/davidnx/baby-kusto-csharp","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/davidnx/baby-kusto-csharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidnx%2Fbaby-kusto-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidnx%2Fbaby-kusto-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidnx%2Fbaby-kusto-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidnx%2Fbaby-kusto-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidnx","download_url":"https://codeload.github.com/davidnx/baby-kusto-csharp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidnx%2Fbaby-kusto-csharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["azure-data-explorer","data-science","kql","kusto"],"created_at":"2026-01-14T06:53:25.216Z","updated_at":"2026-01-14T06:53:25.851Z","avatar_url":"https://github.com/davidnx.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NuGet Gallery | BabyKusto.Server](https://img.shields.io/nuget/vpre/BabyKusto.Core?label=BabyKusto.Core\u0026style=plastic)](https://www.nuget.org/packages/BabyKusto.Core)\n[![NuGet Gallery | BabyKusto.Server](https://img.shields.io/nuget/vpre/BabyKusto.Server?label=BabyKusto.Server\u0026style=plastic)](https://www.nuget.org/packages/BabyKusto.Server)\n\n# BabyKusto\n\nBabyKusto is a self-contained execution engine for the [Kusto Query Language](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/) (KQL).\n\n\n## How to use\n\n1. Evaluate a simple query:\n\n   ```cs\n   var query = \"print hello='world'\";\n   \n   var engine = new BabyKustoEngine();\n   var result = engine.Evaluate(query);\n   ```\n\n2. Inject custom tabular sources:\n\n   Implement an `ITableSource`, then register it with the engine using `BabyKustoEngine.AddGlobalTable(ITableSource table)`. You can think of `ITableSource` as similar to an `IEnumerable\u003cT\u003e`, which allows the engine to get metadata about the table (e.g. its name and type) as well as to iterate over its data.\n\n   Just like `IEnumerable\u003cT\u003e`, the data doesn't have to be materialized ahead of time, and your implementation of `ITableSource` can produce data on the fly. The type, however, has to be static and known ahead of time.\n\n   ```cs\n   ITableSource myTable = /*...*/; // Get your data from anywhere\n   var engine = new BabyKustoEngine();\n   engine.AddGlobalTable(myTable);\n   \n   var result = engine.Evaluate(\"MyTable | count\");\n   ```\n\n3. Play with the samples\n\n   This repo ships with three ready-to-run samples that showcase BabyKusto in action.\n   \n   * [**Sample.HelloWorld**](./samples/Sample.HelloWorld): as simple as it gets, shows how to run a simple query.\n   \n   * [**Sample.ProcessesCli**](./samples/Sample.ProcessesCli): a command-line tool that lets you explore processes running on your machine using KQL. For example, find the process using the most memory with a query like this:\n     ```\n     Processes\n     | project name, memMB=workingSet/1024/1024\n     | order by memMB desc\n     | take 1\n     ```\n\n   * [**Sample.ProcessesServer**](./samples/Sample.ProcessesServer): an ASP .NET Core-based web server that implements the Kusto REST API and exposes the same table `Processes` as the `Sample.ProcessesCli` sample. You can connect to the local Kusto cluster using the official Kusto client (Azure Data Explorer).\n\n## How it works\n\nBabyKusto leverages the official [`Microsoft.Azure.Kusto.Language`](https://www.nuget.org/packages/Microsoft.Azure.Kusto.Language/) package for parsing and semantic analysis of KQL queries.\n\nThe syntax tree is then translated to BabyKusto's internal representation (see [InternalRepresentation](./src/BabyKusto.Core/InternalRepresentation)), which is evaluated by [BabyKustoEvaluator.cs](./src/BabyKusto.Core/Evaluation/BabyKustoEvaluator.cs).\n\nYou can explore the internal representation of a query by setting `dumpIRTree: true` when calling `BabyKustoEngine.Evaluate`.\nBelow is an example of the internal representation for the query:\n\n```\nProcesses\n| project name, memMB=workingSet/1024/1024\n| order by memMB desc\n| take 1\n```\n\n![Internal representation outputs](./docs/internal-representation.png)\n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidnx%2Fbaby-kusto-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidnx%2Fbaby-kusto-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidnx%2Fbaby-kusto-csharp/lists"}