Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* FINBOURNE Luminesce Web API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.13.202
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.finbourne.luminesce.api;
import com.finbourne.luminesce.ApiCallback;
import com.finbourne.luminesce.ApiClient;
import com.finbourne.luminesce.ApiException;
import com.finbourne.luminesce.ApiResponse;
import com.finbourne.luminesce.Configuration;
import com.finbourne.luminesce.Pair;
import com.finbourne.luminesce.ProgressRequestBody;
import com.finbourne.luminesce.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.finbourne.luminesce.model.BackgroundQueryCancelResponse;
import com.finbourne.luminesce.model.BackgroundQueryProgressResponse;
import com.finbourne.luminesce.model.BackgroundQueryResponse;
import com.finbourne.luminesce.model.LusidProblemDetails;
import java.time.OffsetDateTime;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SqlBackgroundExecutionApi {
private ApiClient localVarApiClient;
public SqlBackgroundExecutionApi() {
this(Configuration.getDefaultApiClient());
}
public SqlBackgroundExecutionApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for cancelQuery
* @param executionId ExecutionId returned when starting the query (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public okhttp3.Call cancelQueryCall(String executionId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call cancelQueryValidateBeforeCall(String executionId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling cancelQuery(Async)");
}
okhttp3.Call localVarCall = cancelQueryCall(executionId, _callback);
return localVarCall;
}
/**
* CancelQuery: Cancels (if running) or clears the data from (if completed) a previously started query
* Cancel the query (if still running) / clear the data (if already returned) The following error codes are to be anticipated with standard Problem Detail reports: - 401 Unauthorized - 404 Not Found : The requested query result doesn't exist and is not running.
* @param executionId ExecutionId returned when starting the query (required)
* @return BackgroundQueryCancelResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public BackgroundQueryCancelResponse cancelQuery(String executionId) throws ApiException {
ApiResponse localVarResp = cancelQueryWithHttpInfo(executionId);
return localVarResp.getData();
}
/**
* CancelQuery: Cancels (if running) or clears the data from (if completed) a previously started query
* Cancel the query (if still running) / clear the data (if already returned) The following error codes are to be anticipated with standard Problem Detail reports: - 401 Unauthorized - 404 Not Found : The requested query result doesn't exist and is not running.
* @param executionId ExecutionId returned when starting the query (required)
* @return ApiResponse<BackgroundQueryCancelResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public ApiResponse cancelQueryWithHttpInfo(String executionId) throws ApiException {
okhttp3.Call localVarCall = cancelQueryValidateBeforeCall(executionId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* CancelQuery: Cancels (if running) or clears the data from (if completed) a previously started query (asynchronously)
* Cancel the query (if still running) / clear the data (if already returned) The following error codes are to be anticipated with standard Problem Detail reports: - 401 Unauthorized - 404 Not Found : The requested query result doesn't exist and is not running.
* @param executionId ExecutionId returned when starting the query (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public okhttp3.Call cancelQueryAsync(String executionId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = cancelQueryValidateBeforeCall(executionId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fetchQueryResultCsv
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param delimiter Delimiter string to override the default (optional)
* @param escape Escape character to override the default (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultCsvCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}/csv"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (download != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("download", download));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (delimiter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("delimiter", delimiter));
}
if (escape != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("escape", escape));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultCsvValidateBeforeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultCsv(Async)");
}
okhttp3.Call localVarCall = fetchQueryResultCsvCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, _callback);
return localVarCall;
}
/**
* FetchQueryResultCsv: Fetches the result from a previously started query, in CSV format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param delimiter Delimiter string to override the default (optional)
* @param escape Escape character to override the default (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public String fetchQueryResultCsv(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape) throws ApiException {
ApiResponse localVarResp = fetchQueryResultCsvWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape);
return localVarResp.getData();
}
/**
* FetchQueryResultCsv: Fetches the result from a previously started query, in CSV format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param delimiter Delimiter string to override the default (optional)
* @param escape Escape character to override the default (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public ApiResponse fetchQueryResultCsvWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultCsvValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* FetchQueryResultCsv: Fetches the result from a previously started query, in CSV format. (asynchronously)
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param delimiter Delimiter string to override the default (optional)
* @param escape Escape character to override the default (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultCsvAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultCsvValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fetchQueryResultExcel
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultExcelCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}/excel"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultExcelValidateBeforeCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultExcel(Async)");
}
okhttp3.Call localVarCall = fetchQueryResultExcelCall(executionId, sortBy, filter, select, groupBy, _callback);
return localVarCall;
}
/**
* FetchQueryResultExcel: Fetches the result from a previously started query, in Excel format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public String fetchQueryResultExcel(String executionId, String sortBy, String filter, String select, String groupBy) throws ApiException {
ApiResponse localVarResp = fetchQueryResultExcelWithHttpInfo(executionId, sortBy, filter, select, groupBy);
return localVarResp.getData();
}
/**
* FetchQueryResultExcel: Fetches the result from a previously started query, in Excel format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public ApiResponse fetchQueryResultExcelWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultExcelValidateBeforeCall(executionId, sortBy, filter, select, groupBy, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* FetchQueryResultExcel: Fetches the result from a previously started query, in Excel format. (asynchronously)
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultExcelAsync(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultExcelValidateBeforeCall(executionId, sortBy, filter, select, groupBy, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fetchQueryResultHistogram
* @param executionId ExecutionId returned when starting the query (required)
* @param timestampFieldName Name of the timestamp field used in building the histogram (required)
* @param startAt Start point (of the timestampFieldName field) for the histogram (optional)
* @param endAt End point (of the timestampFieldName field) for the histogram (optional)
* @param bucketSize Optional histogram bucket width. If not provided a set number of buckets between start/end range will be generated. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param jsonProper Should this be text/json (not json-encoded-as-a-string) (optional, default to false)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultHistogramCall(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}/histogram"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (timestampFieldName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("timestampFieldName", timestampFieldName));
}
if (startAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt));
}
if (endAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("endAt", endAt));
}
if (bucketSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("bucketSize", bucketSize));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (jsonProper != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("jsonProper", jsonProper));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultHistogramValidateBeforeCall(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultHistogram(Async)");
}
// verify the required parameter 'timestampFieldName' is set
if (timestampFieldName == null) {
throw new ApiException("Missing the required parameter 'timestampFieldName' when calling fetchQueryResultHistogram(Async)");
}
okhttp3.Call localVarCall = fetchQueryResultHistogramCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, _callback);
return localVarCall;
}
/**
* FetchQueryResultHistogram: Fetches the result from a previously started query, converts it to a histogram (counts in buckets).
* Fetch the histogram in Json format (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated with standard Problem Detail reports: - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param timestampFieldName Name of the timestamp field used in building the histogram (required)
* @param startAt Start point (of the timestampFieldName field) for the histogram (optional)
* @param endAt End point (of the timestampFieldName field) for the histogram (optional)
* @param bucketSize Optional histogram bucket width. If not provided a set number of buckets between start/end range will be generated. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param jsonProper Should this be text/json (not json-encoded-as-a-string) (optional, default to false)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public String fetchQueryResultHistogram(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper) throws ApiException {
ApiResponse localVarResp = fetchQueryResultHistogramWithHttpInfo(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper);
return localVarResp.getData();
}
/**
* FetchQueryResultHistogram: Fetches the result from a previously started query, converts it to a histogram (counts in buckets).
* Fetch the histogram in Json format (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated with standard Problem Detail reports: - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param timestampFieldName Name of the timestamp field used in building the histogram (required)
* @param startAt Start point (of the timestampFieldName field) for the histogram (optional)
* @param endAt End point (of the timestampFieldName field) for the histogram (optional)
* @param bucketSize Optional histogram bucket width. If not provided a set number of buckets between start/end range will be generated. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param jsonProper Should this be text/json (not json-encoded-as-a-string) (optional, default to false)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public ApiResponse fetchQueryResultHistogramWithHttpInfo(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultHistogramValidateBeforeCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* FetchQueryResultHistogram: Fetches the result from a previously started query, converts it to a histogram (counts in buckets). (asynchronously)
* Fetch the histogram in Json format (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated with standard Problem Detail reports: - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param timestampFieldName Name of the timestamp field used in building the histogram (required)
* @param startAt Start point (of the timestampFieldName field) for the histogram (optional)
* @param endAt End point (of the timestampFieldName field) for the histogram (optional)
* @param bucketSize Optional histogram bucket width. If not provided a set number of buckets between start/end range will be generated. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param jsonProper Should this be text/json (not json-encoded-as-a-string) (optional, default to false)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultHistogramAsync(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultHistogramValidateBeforeCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fetchQueryResultJson
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultJsonCall(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}/json"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultJsonValidateBeforeCall(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultJson(Async)");
}
okhttp3.Call localVarCall = fetchQueryResultJsonCall(executionId, sortBy, filter, select, groupBy, limit, page, _callback);
return localVarCall;
}
/**
* FetchQueryResultJson: Fetches the result from a previously started query, in JSON string format. Please move to '/jsonProper' instead. This may be marked as Deprecated in the future.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public String fetchQueryResultJson(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
ApiResponse localVarResp = fetchQueryResultJsonWithHttpInfo(executionId, sortBy, filter, select, groupBy, limit, page);
return localVarResp.getData();
}
/**
* FetchQueryResultJson: Fetches the result from a previously started query, in JSON string format. Please move to '/jsonProper' instead. This may be marked as Deprecated in the future.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public ApiResponse fetchQueryResultJsonWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonValidateBeforeCall(executionId, sortBy, filter, select, groupBy, limit, page, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* FetchQueryResultJson: Fetches the result from a previously started query, in JSON string format. Please move to '/jsonProper' instead. This may be marked as Deprecated in the future. (asynchronously)
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultJsonAsync(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonValidateBeforeCall(executionId, sortBy, filter, select, groupBy, limit, page, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fetchQueryResultJsonProper
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultJsonProperCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}/jsonProper"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (download != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("download", download));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultJsonProperValidateBeforeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultJsonProper(Async)");
}
okhttp3.Call localVarCall = fetchQueryResultJsonProperCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
return localVarCall;
}
/**
* FetchQueryResultJsonProper: Fetches the result from a previously started query, in JSON format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public String fetchQueryResultJsonProper(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
ApiResponse localVarResp = fetchQueryResultJsonProperWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page);
return localVarResp.getData();
}
/**
* FetchQueryResultJsonProper: Fetches the result from a previously started query, in JSON format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public ApiResponse fetchQueryResultJsonProperWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonProperValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* FetchQueryResultJsonProper: Fetches the result from a previously started query, in JSON format. (asynchronously)
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultJsonProperAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonProperValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fetchQueryResultParquet
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultParquetCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}/parquet"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultParquetValidateBeforeCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultParquet(Async)");
}
okhttp3.Call localVarCall = fetchQueryResultParquetCall(executionId, sortBy, filter, select, groupBy, _callback);
return localVarCall;
}
/**
* FetchQueryResultParquet: Fetches the result from a previously started query, in Parquet format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public String fetchQueryResultParquet(String executionId, String sortBy, String filter, String select, String groupBy) throws ApiException {
ApiResponse localVarResp = fetchQueryResultParquetWithHttpInfo(executionId, sortBy, filter, select, groupBy);
return localVarResp.getData();
}
/**
* FetchQueryResultParquet: Fetches the result from a previously started query, in Parquet format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public ApiResponse fetchQueryResultParquetWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultParquetValidateBeforeCall(executionId, sortBy, filter, select, groupBy, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* FetchQueryResultParquet: Fetches the result from a previously started query, in Parquet format. (asynchronously)
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultParquetAsync(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultParquetValidateBeforeCall(executionId, sortBy, filter, select, groupBy, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fetchQueryResultPipe
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultPipeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}/pipe"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (download != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("download", download));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultPipeValidateBeforeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultPipe(Async)");
}
okhttp3.Call localVarCall = fetchQueryResultPipeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
return localVarCall;
}
/**
* FetchQueryResultPipe: Fetches the result from a previously started query, in pipe-delimited format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public String fetchQueryResultPipe(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
ApiResponse localVarResp = fetchQueryResultPipeWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page);
return localVarResp.getData();
}
/**
* FetchQueryResultPipe: Fetches the result from a previously started query, in pipe-delimited format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public ApiResponse fetchQueryResultPipeWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultPipeValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* FetchQueryResultPipe: Fetches the result from a previously started query, in pipe-delimited format. (asynchronously)
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultPipeAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultPipeValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fetchQueryResultSqlite
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultSqliteCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}/sqlite"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultSqliteValidateBeforeCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultSqlite(Async)");
}
okhttp3.Call localVarCall = fetchQueryResultSqliteCall(executionId, sortBy, filter, select, groupBy, _callback);
return localVarCall;
}
/**
* FetchQueryResultSqlite: Fetches the result from a previously started query, in SqLite format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public String fetchQueryResultSqlite(String executionId, String sortBy, String filter, String select, String groupBy) throws ApiException {
ApiResponse localVarResp = fetchQueryResultSqliteWithHttpInfo(executionId, sortBy, filter, select, groupBy);
return localVarResp.getData();
}
/**
* FetchQueryResultSqlite: Fetches the result from a previously started query, in SqLite format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public ApiResponse fetchQueryResultSqliteWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultSqliteValidateBeforeCall(executionId, sortBy, filter, select, groupBy, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* FetchQueryResultSqlite: Fetches the result from a previously started query, in SqLite format. (asynchronously)
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultSqliteAsync(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultSqliteValidateBeforeCall(executionId, sortBy, filter, select, groupBy, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fetchQueryResultXml
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultXmlCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}/xml"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (download != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("download", download));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultXmlValidateBeforeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultXml(Async)");
}
okhttp3.Call localVarCall = fetchQueryResultXmlCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
return localVarCall;
}
/**
* FetchQueryResultXml: Fetches the result from a previously started query, in Xml format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public String fetchQueryResultXml(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
ApiResponse localVarResp = fetchQueryResultXmlWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page);
return localVarResp.getData();
}
/**
* FetchQueryResultXml: Fetches the result from a previously started query, in Xml format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public ApiResponse fetchQueryResultXmlWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultXmlValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* FetchQueryResultXml: Fetches the result from a previously started query, in Xml format. (asynchronously)
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
*/
public okhttp3.Call fetchQueryResultXmlAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultXmlValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getProgressOf
* @param executionId ExecutionId returned when starting the query (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public okhttp3.Call getProgressOfCall(String executionId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/SqlBackground/{executionId}"
.replaceAll("\\{" + "executionId" + "\\}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getProgressOfValidateBeforeCall(String executionId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling getProgressOf(Async)");
}
okhttp3.Call localVarCall = getProgressOfCall(executionId, _callback);
return localVarCall;
}
/**
* GetProgressOf: View progress information (up until this point)
* View progress information (up until this point) The following error codes are to be anticipated most with standard Problem Detail reports: - 401 Unauthorized - 404 Not Found : The requested query result doesn't exist and is not running. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return BackgroundQueryProgressResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public BackgroundQueryProgressResponse getProgressOf(String executionId) throws ApiException {
ApiResponse localVarResp = getProgressOfWithHttpInfo(executionId);
return localVarResp.getData();
}
/**
* GetProgressOf: View progress information (up until this point)
* View progress information (up until this point) The following error codes are to be anticipated most with standard Problem Detail reports: - 401 Unauthorized - 404 Not Found : The requested query result doesn't exist and is not running. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return ApiResponse<BackgroundQueryProgressResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public ApiResponse getProgressOfWithHttpInfo(String executionId) throws ApiException {
okhttp3.Call localVarCall = getProgressOfValidateBeforeCall(executionId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* GetProgressOf: View progress information (up until this point) (asynchronously)
* View progress information (up until this point) The following error codes are to be anticipated most with standard Problem Detail reports: - 401 Unauthorized - 404 Not Found : The requested query result doesn't exist and is not running. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public okhttp3.Call getProgressOfAsync(String executionId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getProgressOfValidateBeforeCall(executionId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for startQuery
* @param body The LuminesceSql query to kick off. (required)
* @param queryName A name for this query. This goes into logs and is available in `Sys.Logs.HcQueryStart`. (optional)
* @param timeoutSeconds Maximum time the query may run for, in seconds: <0 → ∞, 0 → 7200 (2h) (optional, default to 0)
* @param keepForSeconds Maximum time the result may be kept for, in seconds: <0 → 1200 (20m), 0 → 28800 (8h), max = 2,678,400 (31d) (optional, default to 0)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
202
Accepted
-
400
Bad Request
-
*/
public okhttp3.Call startQueryCall(String body, String queryName, Integer timeoutSeconds, Integer keepForSeconds, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/api/SqlBackground";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (queryName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("queryName", queryName));
}
if (timeoutSeconds != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds));
}
if (keepForSeconds != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("keepForSeconds", keepForSeconds));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"text/plain"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "1.13.202");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call startQueryValidateBeforeCall(String body, String queryName, Integer timeoutSeconds, Integer keepForSeconds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling startQuery(Async)");
}
okhttp3.Call localVarCall = startQueryCall(body, queryName, timeoutSeconds, keepForSeconds, _callback);
return localVarCall;
}
/**
* StartQuery: Starts to Execute LuminesceSql in the background.
* Allow for starting a potentially long running query and getting back an immediate response with how to - fetch the data in various formats (if available, or if not simply being informed it is not yet ready) - view progress information (up until this point) - cancel the query (if still running) / clear the data (if already returned) This can still error on things like an outright syntax error, but more runtime errors (e.g. from providers) will not cause this to error (that will happen when attempting to fetch data) Here is an example that intentionally takes one minute to run: ```sql select Str, Takes500Ms from Testing1K where UseLinq = true and [Int] <= 120 ``` This is the only place in the Luminesce WebAPI where the following is supported. This will allow for the same user running a character-identical query not kick off a new query but simply be returned a reference to the already running one for up to `N` seconds (where `N` should be `<=` `keepForSeconds`). The following error codes are to be anticipated with standard Problem Detail reports: - 400 BadRequest - there was something wrong with your query syntax (the issue was detected at parse-time) - 401 Unauthorized
* @param body The LuminesceSql query to kick off. (required)
* @param queryName A name for this query. This goes into logs and is available in `Sys.Logs.HcQueryStart`. (optional)
* @param timeoutSeconds Maximum time the query may run for, in seconds: <0 → ∞, 0 → 7200 (2h) (optional, default to 0)
* @param keepForSeconds Maximum time the result may be kept for, in seconds: <0 → 1200 (20m), 0 → 28800 (8h), max = 2,678,400 (31d) (optional, default to 0)
* @return BackgroundQueryResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
202
Accepted
-
400
Bad Request
-
*/
public BackgroundQueryResponse startQuery(String body, String queryName, Integer timeoutSeconds, Integer keepForSeconds) throws ApiException {
ApiResponse localVarResp = startQueryWithHttpInfo(body, queryName, timeoutSeconds, keepForSeconds);
return localVarResp.getData();
}
/**
* StartQuery: Starts to Execute LuminesceSql in the background.
* Allow for starting a potentially long running query and getting back an immediate response with how to - fetch the data in various formats (if available, or if not simply being informed it is not yet ready) - view progress information (up until this point) - cancel the query (if still running) / clear the data (if already returned) This can still error on things like an outright syntax error, but more runtime errors (e.g. from providers) will not cause this to error (that will happen when attempting to fetch data) Here is an example that intentionally takes one minute to run: ```sql select Str, Takes500Ms from Testing1K where UseLinq = true and [Int] <= 120 ``` This is the only place in the Luminesce WebAPI where the following is supported. This will allow for the same user running a character-identical query not kick off a new query but simply be returned a reference to the already running one for up to `N` seconds (where `N` should be `<=` `keepForSeconds`). The following error codes are to be anticipated with standard Problem Detail reports: - 400 BadRequest - there was something wrong with your query syntax (the issue was detected at parse-time) - 401 Unauthorized
* @param body The LuminesceSql query to kick off. (required)
* @param queryName A name for this query. This goes into logs and is available in `Sys.Logs.HcQueryStart`. (optional)
* @param timeoutSeconds Maximum time the query may run for, in seconds: <0 → ∞, 0 → 7200 (2h) (optional, default to 0)
* @param keepForSeconds Maximum time the result may be kept for, in seconds: <0 → 1200 (20m), 0 → 28800 (8h), max = 2,678,400 (31d) (optional, default to 0)
* @return ApiResponse<BackgroundQueryResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
202
Accepted
-
400
Bad Request
-
*/
public ApiResponse startQueryWithHttpInfo(String body, String queryName, Integer timeoutSeconds, Integer keepForSeconds) throws ApiException {
okhttp3.Call localVarCall = startQueryValidateBeforeCall(body, queryName, timeoutSeconds, keepForSeconds, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* StartQuery: Starts to Execute LuminesceSql in the background. (asynchronously)
* Allow for starting a potentially long running query and getting back an immediate response with how to - fetch the data in various formats (if available, or if not simply being informed it is not yet ready) - view progress information (up until this point) - cancel the query (if still running) / clear the data (if already returned) This can still error on things like an outright syntax error, but more runtime errors (e.g. from providers) will not cause this to error (that will happen when attempting to fetch data) Here is an example that intentionally takes one minute to run: ```sql select Str, Takes500Ms from Testing1K where UseLinq = true and [Int] <= 120 ``` This is the only place in the Luminesce WebAPI where the following is supported. This will allow for the same user running a character-identical query not kick off a new query but simply be returned a reference to the already running one for up to `N` seconds (where `N` should be `<=` `keepForSeconds`). The following error codes are to be anticipated with standard Problem Detail reports: - 400 BadRequest - there was something wrong with your query syntax (the issue was detected at parse-time) - 401 Unauthorized
* @param body The LuminesceSql query to kick off. (required)
* @param queryName A name for this query. This goes into logs and is available in `Sys.Logs.HcQueryStart`. (optional)
* @param timeoutSeconds Maximum time the query may run for, in seconds: <0 → ∞, 0 → 7200 (2h) (optional, default to 0)
* @param keepForSeconds Maximum time the result may be kept for, in seconds: <0 → 1200 (20m), 0 → 28800 (8h), max = 2,678,400 (31d) (optional, default to 0)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
202
Accepted
-
400
Bad Request
-
*/
public okhttp3.Call startQueryAsync(String body, String queryName, Integer timeoutSeconds, Integer keepForSeconds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = startQueryValidateBeforeCall(body, queryName, timeoutSeconds, keepForSeconds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}