Skip to content

Azure/azure-kusto-node

Folders and files

NameName
Last commit message
Last commit date
Jan 12, 2025
Feb 2, 2025
Sep 16, 2024
Aug 22, 2023
Nov 16, 2023
Apr 18, 2023
Sep 29, 2024
Apr 25, 2022
Jan 23, 2025
Apr 1, 2020
Apr 25, 2022
Sep 12, 2018
Jan 8, 2024
Feb 7, 2023
Jun 15, 2023
Sep 22, 2024
Sep 16, 2024
Jan 23, 2025
Apr 18, 2023
Jan 23, 2025
Nov 3, 2024
Sep 16, 2024
Jan 23, 2025

Repository files navigation

Microsoft Azure Kusto (Azure Data Explorer) SDK for JavaScript

Github Actions Build

This repository is for JavaScript (Node.js & Browser) and it contains the following SDKs:

  • Azure Kusto Data SDK: Execute queries against a Kusto Cluster. docs
  • Azure Kusto Ingest SDK: Ingest Data into a Kusto Cluster. docs

General docs are located at https://docs.microsoft.com/en-us/azure/data-explorer/

The SDK team publishes the SDKs as npm packages:

Need Support?

  • Have a feature request for SDKs? Please post it on User Voice to help us prioritize
  • Have a technical question? Ask on Stack Overflow with tag "azure-data-explorer"
  • Need Support? Every customer with an active Azure subscription has access to support with guaranteed response time. Consider submitting a ticket and get assistance from Microsoft support team
  • Found a bug? Please help us fix it by thoroughly documenting it and filing an issue.

Examples

In the repository, you will find a set of simple samples that will help you get started:

Best Practices

See the SDK best practices guide, which though written for the .NET SDK, applies similarly here.

Platforms compatibility

The Azure Kusto SDK for is built for Node v18.x.x and above.

Looking for SDKs for other languages/platforms?

Contribute

We gladly accept community contributions.

  • Issues: Please report bugs using the Issues section of GitHub
  • Forums: Interact with the development teams on StackOverflow or the Microsoft Azure Forums
  • Source Code Contributions: If you would like to become an active contributor to this project please follow the instructions provided in Contributing.md.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

For general suggestions about Microsoft Azure please use our UserVoice forum.

Bundling Azure SDK libraries for a browser

To use Azure SDK libraries on a website, you need to convert your code to work inside the browser. You do this using a tool called a bundler. This process takes JavaScript code written using Node.js conventions and converts it into a format that is understood by browsers. Read here for more info and examples.

Browser sample

The code is browser-compatible, with the main differences being that ingestFromFile accepts a Blob object and ingestFromStream accepts an ArrayBuffer.
The only authentication methods available are user prompt and token provider.

Fallback version of files used in the browser, are called '*.browser.ts'.

To run a quick sample for azure-kusto-ingest we provided a webpack config which uses the file index.html which runs index.js as a script. First add to index.ts:

import {main} from "../exampleBrowser"

main().catch((e) => console.log(e));

Then run: npm run webpack