You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by Anton Bubna-Litic <An...@quantium.com.au> on 2016/09/26 04:58:26 UTC

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

RE: Create models/cubes without the web UI

Posted by Anton Bubna-Litic <An...@quantium.com.au>.
Thanks! I will look into that
Cheers,
Anton

From: lxw [mailto:lxw1234@qq.com]
Sent: Monday, 26 September 2016 3:52 PM
To: user <us...@kylin.apache.org>
Subject: Re: Create models/cubes without the web UI

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";<An...@quantium.com.au>>;
Date:  Mon, Sep 26, 2016 12:58 PM
To:  "user@kylin.apache.org<ma...@kylin.apache.org>>;
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

Re: Create models/cubes without the web UI

Posted by lxw <lx...@qq.com>.
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";<An...@quantium.com.au>;
Date:  Mon, Sep 26, 2016 12:58 PM
To:  "user@kylin.apache.org"<us...@kylin.apache.org>; 

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