From 4a64402e706f48c82f0f78efc6d2a9f393a0e2c6 Mon Sep 17 00:00:00 2001 From: Ohad Bitton Date: Thu, 27 Aug 2020 16:13:56 +0300 Subject: [PATCH] v2.2.0 --- README.md | 2 +- pom.xml | 2 +- samples/src/main/java/Query.java | 20 +++++++++++--------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 83d94896..77be5beb 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This method is the easiest to follow, just add the following dependency to your com.microsoft.azure.kusto kusto-ingest - 2.1.0 + 2.1.2 ``` diff --git a/pom.xml b/pom.xml index cb94373c..8e107df2 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ - 2.1.2 + 2.2.0 UTF-8 1.8 diff --git a/samples/src/main/java/Query.java b/samples/src/main/java/Query.java index d989695d..4ffc6723 100644 --- a/samples/src/main/java/Query.java +++ b/samples/src/main/java/Query.java @@ -10,20 +10,22 @@ public class Query { public static void main(String[] args) { try { - ConnectionStringBuilder csb = ConnectionStringBuilder.createWithAadApplicationCredentials( - System.getProperty("clusterPath"), - System.getProperty("appId"), - System.getProperty("appKey"), - System.getProperty("appTenant")); - ClientImpl client = new ClientImpl(csb); + String ClientID ="d5e0a24c-3a09-40ce-a1d6-dc5ab58dae66"; + String pass = "Unh581Hzn50LRWPW5XTMV-3_j5.DdisG3."; + String auth = "microsoft.com"; +// IngestClient client = IngestClientFactory.createClient(ConnectionStringBuilder.createWithDeviceCodeCredentials("https://ingest-ohbitton.kusto.windows.net")); + ConnectionStringBuilder csb = ConnectionStringBuilder.createWithAadApplicationCredentials("https://ohbitton.dev.kusto.windows.net/", ClientID, pass, auth); - KustoOperationResult results = client.execute( System.getProperty("dbName"), System.getProperty("query")); + ClientImpl client = new ClientImpl(csb); + ClientRequestProperties clientRequestProperties = new ClientRequestProperties(); + clientRequestProperties.setOption("ClientRequestId", "ohadId"); + clientRequestProperties.setTimeoutInMilliSec(999999L); + KustoOperationResult results = client.execute( "ohtst", "ddd | take 1",clientRequestProperties); KustoResultSetTable mainTableResult = results.getPrimaryResults(); System.out.println(String.format("Kusto sent back %s rows.", mainTableResult.count())); // in case we want to pass client request properties - ClientRequestProperties clientRequestProperties = new ClientRequestProperties(); - clientRequestProperties.setTimeoutInMilliSec(TimeUnit.MINUTES.toMillis(1)); + results = client.execute( System.getProperty("dbName"), System.getProperty("query"), clientRequestProperties); } catch (Exception e) {