Kylin also has many RESTful APIs include create models/cubes.
You can find them in "org.apache.kylin.rest.controller".
For example , I use these two methods to create model and cube:
//Create Cube
public static HttpResponse createCube(CubeRequest cubeRequest) {
HttpResponse res = new HttpResponse();
String url = "http://127.0.0.1:7070/kylin/api/models";
try {
res =
HTTP.kylinPost(url,JsonUtil.writeValueAsIndentString(cubeRequest));
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return res;
}
//Create Model
public static HttpResponse createModel(ModelRequest modelRequest) {
HttpResponse res = new HttpResponse();
String url = "http://127.0.0.1:7070/kylin/api/cubes";
try {
res =
HTTP.kylinPost(url,JsonUtil.writeValueAsIndentString(modelRequest));
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return res;
}
------------------ Original ------------------
From: "Anton Bubna-Litic";<[email protected]>;
Date: Mon, Sep 26, 2016 12:58 PM
To: "[email protected]"<[email protected]>;
Subject: Create models/cubes without the web UI
Hi,
I have just started using Kylin and was wondering if there was a way to create
models/cubes without using the web UI? I have been combing the JIRA and user
groups and haven??t found anything besides this ticket -
https://issues.apache.org/jira/browse/KYLIN-1605 but I am secretly hoping that
I missed something.
Cheers,
Anton