Java Code Examples for org.apache.kylin.rest.request.SaveSqlRequest

The following examples show how to use org.apache.kylin.rest.request.SaveSqlRequest. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: kylin-on-parquet-v2   Source File: QueryController.java    License: Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/saved_queries", method = RequestMethod.POST, produces = { "application/json" })
@ResponseBody
public void saveQuery(@RequestBody SaveSqlRequest sqlRequest) throws IOException {
    String creator = SecurityContextHolder.getContext().getAuthentication().getName();
    Query newQuery = new Query(sqlRequest.getName(), sqlRequest.getProject(), sqlRequest.getSql(),
            sqlRequest.getDescription());

    queryService.saveQuery(creator, newQuery);
}
 
Example 2
Source Project: kylin   Source File: QueryController.java    License: Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/saved_queries", method = RequestMethod.POST, produces = { "application/json" })
@ResponseBody
public void saveQuery(@RequestBody SaveSqlRequest sqlRequest) throws IOException {
    String creator = SecurityContextHolder.getContext().getAuthentication().getName();
    Query newQuery = new Query(sqlRequest.getName(), sqlRequest.getProject(), sqlRequest.getSql(),
            sqlRequest.getDescription());

    queryService.saveQuery(creator, newQuery);
}
 
Example 3
Source Project: Kylin   Source File: QueryController.java    License: Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/saved_queries", method = RequestMethod.POST)
@ResponseBody
@Timed(name = "saveQuery")
public void saveQuery(@RequestBody SaveSqlRequest sqlRequest) throws IOException {
    String creator = SecurityContextHolder.getContext().getAuthentication().getName();
    Query newQuery = new Query(sqlRequest.getName(), sqlRequest.getProject(), sqlRequest.getSql(), sqlRequest.getDescription());

    queryService.saveQuery(creator, newQuery);
}