Comments (2)
Either way you will have to create the objects - the rows we get from the server are arrays, and someone has to merge them with the columns.
We don't have anything like this built in, but you can use getData()
to easily do it yourself -
KustoOperationResult completeResult= queryClient.execute(<databaseName>, <your query>);
KustoResultSetTable mainTableResult = completeResult.getPrimaryResults();
List<Map<String, Object>> resultMap = mainTableResult.getData()
.stream().map(row ->
IntStream.range(0, row.size()).
mapToObj(ir -> new AbstractMap.SimpleEntry<>(mainTableResult.getColumns()[ir].getColumnName(), row.get(ir)))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)))
.collect(Collectors.toList());
JSONArray jsonArray = new JSONArray(resultMap);
from azure-kusto-java.
Hi @saumilsdk,
We implemented executeToJsonResult()
to bypass the conversion to KustoResultSetTable
in the first place. It returns the json
as a String
, intended for specific performance scenarios.
That said, our service returns results in this KustoResultSetTable
format, so the json
will still need to be parsed to obtain the POJO components of it.
I want to understand your issue better, though. What do you mean by, "I am not comfortable with iterating each row one by one and creating those manually"? What exactly is the concern with working with a KustoResultSetTable
object? Note that we have examples of working with results.
from azure-kusto-java.
Related Issues (20)
- Format classes for Parameterized queries does not exist in release binaries HOT 1
- The current version of the jackson-databind dependency has a security vulnerability HOT 2
- KustoResultSetTable getTimestamp should respect ISO format
- CloudInfo.retrieveCloudInfoForCluster should respect user specified httpClient HOT 2
- 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
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.