Skip to content

C# Fluent interface library for Azure Kusto query language

License

Notifications You must be signed in to change notification settings

weixian-zhang/FluentKusto

Repository files navigation

FluentKusto

Build Status

FluentKusto is a C# library that facilitates users to write Kusto queries in C# with fluent interface and strongly typed Log Analytics tables and columns.
This project is in an early stage and more Kusto operators will be added overtime. Nuget package to be made available in future.

Supported Scalar Operators

  • Where
  • Extend
  • Project
  • Join
  • Count
  • Limit
  • Distinct, DistinctAll

Supported String Operators

String operators are Extension methods

  • in - As in is a reserved keyword in C# for pass by refrence, this operator is implemented with capital I as In. E.g: "SourceSystem".In("System A", "System B", "System C")
  • equal - tbl.Computer.equal("Com1")
  • notequal - tbl.Computer.notequal("Com1")
  • equalnoncase - tbl.BulletinUrl.equalnoncase("http://somewebsite.com")

Supported Functions

  • ago - Kql.ago("4h")
  • split - Kql.split(string str, '/')
  • parse_json - Kql.parse_json(string str)
  • array_length - Kql.array_length(c.ResourceArray)

Kusto Dynamic Column with .Net dynamic Type

To support the ability of Kusto able to define dynamic columns for e.g | Extend {dynamic column} = TimeGenerated, and also the ability to reference dynamic columns in other operator expressions. FluentKusto supply an additional dynamic type paramater into methods such as Extend(Table, DynamicColumn) and Project(Table, DynamicColumn). Hence, users can fully avoid string expression and use dynamic Typed parameter for reference and other complex syntax like indexer []

About

C# Fluent interface library for Azure Kusto query language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages