Comments (8)
Hi @yogilad,
I'm using the KustoSDK.
public static void main(String[] args) {
try {
ConnectionStringBuilder csb = ConnectionStringBuilder.createWithAadApplicationCredentials(
System.getenv("clusterPath"),
System.getenv("appId"),
System.getenv("appKey"),
System.getenv("appTenant"));
ClientImpl client = new ClientImpl(csb);
KustoOperationResult results = client.execute(System.getenv("dbName"), System.getenv("query"));
KustoResultSetTable mainTableResult = results.getPrimaryResults();
System.out.println(String.format("Kusto sent back %s rows.", mainTableResult.count()));
// iterate values
while (mainTableResult.next()) {
List<Object> nextValue = mainTableResult.getCurrentRow();
}
// in case we want to pass client request properties
ClientRequestProperties clientRequestProperties = new ClientRequestProperties();
clientRequestProperties.setTimeoutInMilliSec(TimeUnit.MINUTES.toMillis(1));
results = client.execute(System.getenv("dbName"), System.getenv("query"), clientRequestProperties);
System.out.println(results.getPrimaryResults().getData());
} catch (Exception e) {
e.printStackTrace();
}
}
For the URL I'm using the following: https://ade.applicationinsights.io/subscriptions/{subscription-id}/resourceGroups/{resourceGroup}/providers/microsoft.insights/components/{cluster}
I'm able to access the cluster from the Azure Data Explorer (https://dataexplorer.azure.com/) when I've added the Application Insights component as a cluster.
from azure-kusto-java.
I believe the C# SDK supports this and includes some specific adaptations to the authentication code to support it.
I'll double check and let you know if there's a way to work around those.
from azure-kusto-java.
Hi @amalathask ,
Are you trying to authenticate (and connect) to Azure App Insights with KustoSDK or are you trying to authenticate to the underlying Kusto Service?
Can you share your code for setting up the client with values of al l fields (minus any credentials of course)?
Are you able to access your cluster from Kusto Explorer?
from azure-kusto-java.
Hi @yogilad
Following up on this, do you know if it is possible at all to receive data from application insights through the Kusto SDK? If yes, do you have an example on how to do it?
We followed this site: https://docs.microsoft.com/en-us/azure/data-explorer/query-monitor-data to add an Application Insights cluster to our Azure Data Explorer which worked fine.
from azure-kusto-java.
Hi,
Query is possible via a proxy mentioned in the above example provided by @amalathask.
You need to use a late client version which includes some changes to the authentication flow.
from azure-kusto-java.
Hi @yogilad
What do you mean by a late client version? Do you have an example for that? We are currently using the newest version of the SDK and getting the same error.
from azure-kusto-java.
Hi @rongshabing ,
Can you make sure your client passes through this line?
Also, can you share your activity id from the exception you get?
from azure-kusto-java.
Hi @rongshabing,
In response to your question on September 1, @yogilad was referring to a relatively recent version of this client, which includes the changes he referenced. Ideally the latest version :-)
In any case, since we haven't heard from you in 5 months, we're going to close this issue. If you still need help, please reopen with a response to our questions above.
from azure-kusto-java.
Related Issues (20)
- Asynchronous HTTP Client HOT 24
- Not able to access ADX cluster deployed in a VNet HOT 2
- Imcompatible libraries HOT 1
- All floating point numbers are now being returned as BigDecimals HOT 1
- AKJ >=4.0.0 Breaks QueuedIngestClient Stream Ingestion HOT 5
- This repo is missing important files
- Feature Request: Make AbstractSourceInfo "public" HOT 1
- Requests fail with Http Errorcode 400 if 'x-ms-user' contains umlauts HOT 1
- azure-core dependency conflicts HOT 2
- KustoResultSetTable getLong(String columnName) gives casting exception
- ClientRequestProperties transfer parameters by JDK 11 issue HOT 7
- SSL Exception From HTTP Apache Client Library HOT 9
- Setting timeout via the code does not stop the query HOT 3
- Introduce KustoRequest Object HOT 1
- [BUG] Using Kusto QueuedIngestClient throwing ConcurrentModificationException HOT 2
- Java - add advanced proxy settings in the SDK level (for AT&T) HOT 1
- Fix test issue with the new Java Http client
- Reconfigure Java release GitHub Action to use federated identity
- Add support for using DefaultAzureCredential HOT 1
- msal4j update from azure bom removes functionality from deprecated method causing token fetch failures
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-kusto-java.