@Rai, Abhishek - Thanks for the question and using MS Q&A platform.
Result truncation is a limit set by default on the result set returned by the query. Kusto limits the number of records returned to the client to 500,000, and the overall data size for those records to 64 MB. When either of these limits is exceeded, the query fails with a "partial query failure".
There are several strategies for dealing with this error.
- Reduce the result set size by modifying the query to only return interesting data. This strategy is useful when the initial failing query is too "wide". For example, the query doesn't project away data columns that aren't needed.
- Reduce the result set size by shifting post-query processing, such as aggregations, into the query itself. The strategy is useful in scenarios where the output of the query is fed to another processing system, and that then does other aggregations.
- Switch from queries to using data export when you want to export large sets of data from the service.
- Instruct the service to suppress this query limit using
set
statements listed below or flags in client request properties.
Methods for reducing the result set size produced by the query include:
- Use the summarize operator group and aggregate over similar records in the query output. Potentially sample some columns by using the take_any aggregation function.
- Use a take operator to sample the query output.
- Use the substring function to trim wide free-text columns.
- Use the project operator to drop any uninteresting column from the result set.
To retrieve all the records without truncation, you can specify set notruncation;
at the beginning of your query. This will ensure that all the records are returned without any truncation. However, please note that this may cause the query to take longer to execute and may also consume more resources.
Here's an example of how to use set notruncation;
in your query:
set notruncation;
TestTable1
Please note that this is just an example and you should replace TestTable1
with your own table name. Also, please make sure that your query does not exceed the allowed limits.
For more details, refer to Azure Data Explorer - Query Limit on result set size (result truncation).
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.