Skip to content

Files

Latest commit

 

History

History
83 lines (55 loc) · 4.25 KB

time-series-insights-query-data-csharp.md

File metadata and controls

83 lines (55 loc) · 4.25 KB
title description ms.service author ms.author manager ms.reviewer ms.devlang ms.topic ms.date
Query data from a Gen1 environment using C# code - Azure Time Series Insights Gen1 | Microsoft Docs
Learn how to query data from an Azure Time Series Insights Gen1 environment using a custom app written in C#.
time-series-insights
shreyasharmamsft
shresha
cnovak
orspodek
csharp
conceptual
09/30/2020

Query data from the Azure Time Series Insights Gen1 environment using C Sharp

[!INCLUDE retirement]

Caution

This is a Gen1 article.

This C# example demonstrates how to use the Gen1 Query APIs to query data from Azure Time Series Insights Gen1 environments.

Summary

The sample code below demonstrates the following features:

Prerequisites and setup

Complete the following steps before you compile and run the sample code:

  1. Provision a Gen1 Azure Time Series Insights environment.
  2. Configure your Azure Time Series Insights environment for Microsoft Entra ID as described in Authentication and authorization.
  3. Install the required project dependencies.
  4. Edit the sample code below by replacing each #DUMMY# with the appropriate environment identifier.
  5. Execute the code inside Visual Studio.

Project dependencies

It's recommended that you use the newest version of Visual Studio:

The sample code has two required dependencies:

Download the packages in Visual Studio 2019 by selecting the Build > Build Solution option.

Alternatively, add the packages using NuGet 2.12+:

  • dotnet add package Newtonsoft.Json --version 9.0.1
  • dotnet add package Microsoft.IdentityModel.Clients.ActiveDirectory --version 3.13.9

C# sample code

Please refer to the Azure Time Series Insights] repo to access the C# sample code.

Next steps