Skip to main content

Posts

Speaker at C# Corner MVP Ft Show

Yesterday I got a privilege to be a speaker on C# Corner MVP Show. It was a great show and a wonderful interaction with host Stephan Simon on my topic ‘Handling Notifications using Microsoft Graph’. Recording is available on my YuTube channel named Shweta Lodha .

Troubleshooting Bad Gateway errors for Ngrok

Ngrok is one of the well-known tool for local tunneling  solution. I have used it many times being the easiest tool for any developer. This time once again, I thought to use Ngrok for my current application, which uses Graph API to get notifications from Microsoft Teams channel. As always, I launched the Ngrok with required port as shown below: ngrok http 44332    and it got connected as shown below: Till now everything is alright. But now when I ran my application with Ngrok’s forwarding address, I end up getting an error -  400 Bad Request . And here is what I read more about this: Seems like some applications can’t deal with the default behavior of Ngrok and need an explicit mention of header information, which means there is another way to handle such scenario: ngrok http http://localhost:44332 -host-header="localhost:44332" After connecting Ngrok with above command, everything went very smooth and as expected. Hope this tip would be useful fo...

Azure Data Explorer - Approaches For Data Aggregation In Kusto

In my previous posts I tried to transcribe the things that were not too obvious for me when I initially started working on Kusto Query Language. Continuing with the same thought, this time I’m going to share a few of the approaches that can be taken to aggregate the data.   Let’s consider the below input data: let demoData = datatable(Environment: string, Version: int , BugCount: int )   [   "dev" ,1, 1,   "test" ,1, 1,   "prod" ,1, 1,   "dev" ,2, 2,   "test" ,2, 0,   "dev" ,3, 2,   "test" ,3, 0,   "prod" ,2,2,   ]; Description Get the average number of bugs falling under each category.   Expected Output   There are several approaches to achieve this.   Approach 1 - Using Partition Operator   Partition operator first partitions the input data with defined criteria and then combines a...

Azure Data Explorer - Reading JSON Data Using Kusto

You may have a requirement wherein you have a data stored in a column as JSON format and business need is to read that column value. Now when it comes to JSON, there are few ways, which can help us to read this data and represent that in a meaningful and readable manner. Let’s consider below sample data: In the above table, last column named Description is holding the data which is in JSON format. Using Dynamic One way to extract data of description column is by using the dynamic literal as shown in below query: demoData  | extend AllProperties = todynamic(Description)   | project Environment, BugId = AllProperties[ "Id" ], AssignedTo = AllProperties[ "AssignedTo" ]  On execution of above query, you will notice that all the properties of JSON are extracted in the form of new columns, as shown below: We can further improvise the above query in terms of readability. If the column title and the JSON property ...

Perform Calculation On Multiple Values From Single Kusto Input

Let’s consider a scenario, wherein requirement is to find out the percentage of a particular type of values from the single input set. Below can be considered as an example of input sample data and need is to find out how much percentage of dev releases and how much percentage of prod releases are present in the input data. let demoData = datatable(Environment: string, Feature:string)   [   "dev" ,  "Feature1" ,   "test" ,  "Feature1" ,   "prod" ,  "Feature1" ,   "Dev" ,  "Feature2" ,   "test" ,  "Feature2" ,   "dev" ,  "Feature3" ,   "test" ,  "Feature3" ,   "prod" ,  "Feature3"    ];  Approach In order to achieve the solution, one has to go through various steps as mentioned below: Step 1: Get total number of records from input set let totalRecords = demoData |  count   | project ...