v2.2.0
This commit is contained in:
Родитель
0e1112a98e
Коммит
4a64402e70
|
@ -22,7 +22,7 @@ This method is the easiest to follow, just add the following dependency to your
|
|||
<dependency>
|
||||
<groupId>com.microsoft.azure.kusto</groupId>
|
||||
<artifactId>kusto-ingest</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<version>2.1.2</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -30,7 +30,7 @@
|
|||
</developers>
|
||||
|
||||
<properties>
|
||||
<revision>2.1.2</revision> <!-- CHANGE THIS to adjust project version-->
|
||||
<revision>2.2.0</revision> <!-- CHANGE THIS to adjust project version-->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче