highlightjs-kql
v1.0.1
Published
Kusto Query Language (KQL) syntax highlighting for highlight.js
Maintainers
Readme
highlightjs-kql
Kusto Query Language (KQL) syntax highlighting for highlight.js.
About KQL
Kusto Query Language (KQL) is a read-only query language used to explore data in Azure Data Explorer, Azure Monitor (Log Analytics), Azure Sentinel, and other Microsoft services. It uses a pipe-based syntax similar to shell pipelines.
Learn more: https://learn.microsoft.com/en-us/kusto/query/ Grammar Reference: https://github.com/microsoft/Kusto-Query-Language
Usage
Via CDN
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js"></script>
<script src="dist/kql.min.js"></script>
<script>hljs.highlightAll();</script>Via npm
npm install highlightjs-kqlconst hljs = require('highlight.js');
const kql = require('highlightjs-kql');
hljs.registerLanguage('kql', kql);Example
StormEvents
| where StartTime between (datetime(2007-01-01) .. datetime(2007-12-31))
| where State == "FLORIDA"
| summarize count() by EventType
| sort by count_ desc
| take 10
| render barchartDevelopment
To test this grammar, clone it into the extra/ folder of a highlight.js checkout, then build and run tests:
cd /path/to/highlight.js
# clone or symlink this repo into extra/
node ./tools/build.js -t node
npm run testLicense
MIT
