An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
Hello @Biswajit Das ,
Thanks for the question and using MS Q&A platform.
To use the Azure Data Explorer Node.js SDK in your Angular project, you will need to follow these steps:
Install the Azure Data Explorer Node.js SDK by running the following command in your terminal:
npm install @azure/kusto-data
Import the required modules in your Angular component or service where you want to use the Azure Data Explorer SDK. For example:
import { KustoClient, ClientRequestProperties } from '@azure/kusto-data';
To authenticate with Azure Data Explorer, you will need to use a service principal or managed identity. You can follow the instructions in the Authenticate with Azure Data Explorer using a service principal or Authenticate with Azure Data Explorer using a managed identity documentation to set this up.
Once you have authenticated, you can create a KustoClient instance and use it to perform CRUD operations on your Azure Data Explorer cluster and database. For example:
const client = new KustoClient(clientRequestProperties);
// Insert data into a table
const insertCommand = `
INSERT INTO MyTable (Column1, Column2)
VALUES ('Value1', 'Value2')
`;
client
.execute(insertCommand)
.then((result) => {
console.log(`Inserted ${result.primaryResults[0].rowCount} rows`);
})
.catch((error) => {
console.error(error);
});
For more information on using the Azure Data Explorer Node.js SDK, you can refer to the Azure Data Explorer Node.js SDK documentation.
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is jhow you can be part of Q&A Volunteer Moderators