Skip to content

Files

Latest commit

 

History

History
80 lines (56 loc) · 5.43 KB

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

File metadata and controls

80 lines (56 loc) · 5.43 KB
title description ms.service author ms.author manager ms.reviewer ms.devlang ms.topic ms.date
Query data from a Gen2 environment using C# - Azure Time Series Insights | Microsoft Docs
Learn how to query data from an Azure Time Series Insights Gen2 environment by using an app written in C#.
time-series-insights
shreyasharmamsft
shresha
cnovak
orspodek
csharp
conceptual
10/02/2020

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

[!INCLUDE retirement]

This C# example demonstrates how to query data from the Gen2 Data Access APIs in Azure Time Series Insights Gen2 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 Gen2 Azure Time Series Insights environment.
  2. Configure your Azure Time Series Insights environment for Microsoft Entra ID as described in Authentication and authorization.
  3. Run the GenerateCode.bat as specified in the Readme.md to generate the Azure Time Series Insights Gen2 client dependencies.
  4. Open the TSIPreviewDataPlaneclient.sln solution and set DataPlaneClientSampleApp as the default project in Visual Studio.
  5. Install the required project dependencies using the steps described below and compile the example to an executable .exe file.
  6. Run the .exe file by double-clicking on it.

Project dependencies

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

The sample code has several required dependencies which can be viewed in the packages.config file.

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

Alternatively, add each package using NuGet 2.12+. For example:

  • dotnet add package Microsoft.IdentityModel.Clients.ActiveDirectory --version 4.5.1

C# sample code

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

Note

  • The code sample can be executed without altering the default environment variables.
  • The code sample will compile to a .NET executable console app.

Next steps