Re: Save querie issue

2016-06-23 Thread ShaoFeng Shi
yes, check: https://issues.apache.org/jira/browse/KYLIN-1760

2016-06-24 1:49 GMT+08:00 Alberto Ramón :

> Hello
>
> I'm testing K 1.5.2.1 : Insight > Save querie Isn't working (do notihin,
> no errors)
> Somebody can check this issue in their systems?
>
>
> BR. Alberto
>



-- 
Best regards,

Shaofeng Shi


Save querie issue

2016-06-23 Thread Alberto Ramón
Hello

I'm testing K 1.5.2.1 : Insight > Save querie Isn't working (do notihin, no
errors)
Somebody can check this issue in their systems?


BR. Alberto


Re: MAX aggregation for name column

2016-06-23 Thread ShaoFeng Shi
The new "Extended column" measure will match your case; It is a "Derived"
column but on fact table; You can see more with KYLIN-1313.

2016-06-23 17:25 GMT+08:00 Hao Chen :

> Hi, all.
> given a dimension table:
>
> dim_table{
> id_column int,
> name_column string
> }
>
> and a fact table:
> fact_table{
> id_column int,
> measure int
> }
>
> usually we select with this sql:
> select
> dim.id_column,
> max(dim.name_column),
> sum(fact.measure)
> from fact_table as fact
> join dim_table as dim
> on fact.id_column = dim.id_column
> group by dim.id_column
>
>
> we just want to get the name column.
> one way is to add the name_column as a derived dimension. But it costs
> memory and slow down query.
> another way is make name_column as a measure with max as aggregation
> function. But kylin do not support Max on string type column.
>
> Is there any better way to solve this problem?
> thanks!
>
>
>
>
>
>
>
>
>
>
>
>
> --
> 陈昊/Jerry Chen
>
> Tel: (+86)15013773175
> Email:  jerrychen 1...@gmail.com
> P.C.   518055
> Add:   中国广东省深圳市西丽大学城清华园H楼205
> Room 205, Building H, Tsinghua Campus, The University Town, Shenzhen,
> P.R.China
> 清华大学计算机科学与技术系
> Department of  Computer Science and Technology, Tsinghua University
>



-- 
Best regards,

Shaofeng Shi


Re: kylin Remote JDBC Driver problem

2016-06-23 Thread lidong
This might be a bug, I created a JIRA for tracking:
https://issues.apache.org/jira/browse/KYLIN-1817


Thanks,
Dong Li


Original Message
Sender:仇同心qiutong...@jd.com
Recipient:dev@kylin.apache.org...@kylin.apache.org; 
user@kylin.apache.orgu...@kylin.apache.org
Date:Thursday, Jun 23, 2016 14:30
Subject:kylin Remote JDBC Driver problem


大家好:
 用kylin的JDBC查询,查询条件是date类型的,但是查询不出数据,以下是代码:
  driver = (Driver) Class.forName("org.apache.kylin.jdbc.Driver").newInstance();

 Properties info = new Properties();
 info.put("user", "ADMIN");
 info.put("password", "KYLIN");

 conn = driver.connect("jdbc:kylin://IP:7070/learn_kylin", info); 
(此处IP代替了真实IP地址)
 state = conn.prepareStatement("select * from KYLIN_SALES where part_dt = ?");

 SimpleDateFormat simpleTime = new SimpleDateFormat("-MM-dd");
 java.util.Date passUtilDate = simpleTime.parse("2013-01-01");
 java.sql.Date passSqlDate = new java.sql.Date(passUtilDate.getTime());

 System.out.println("passSqlDate"+passSqlDate);

 state.setDate(1, passSqlDate);

 resultSet = state.executeQuery();


控制台日志为:
 passSqlDate2013-01-01
2016-06-23 14:19:52,591 DEBUG [main] jdbc.KylinClient:341 : Post body:
{"sql":"select * from KYLIN_SALES where part_dt = 
?","project":"learn_kylin","acceptPartial":false,"params":[{"className":"java.lang.Integer","value":"15706"}]}
2016-06-23 14:19:52,592 DEBUG [main] wire.content:84 :  
"{"userDetails":{"password":null,"username":"ADMIN","authorities":[{"authority":"ROLE_ADMIN"},{"authority":"ROLE_ANALYST"},{"authority":"ROLE_MODELER"}],"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}}"

为什么kylin把传进的参数转为了"params":[{"className":"java.lang.Integer","value":"15706"}]???


谢谢!

Re: kylin Remote JDBC Driver problem

2016-06-23 Thread ShaoFeng Shi
sorry, JIRA already created:
https://issues.apache.org/jira/browse/KYLIN-1817

2016-06-23 16:45 GMT+08:00 ShaoFeng Shi :

> Hi TongXin, would you mind to open a JIRA for this? and please provide the
> Kylin version number, thank you.
>
> 2016-06-23 14:30 GMT+08:00 仇同心 :
>
>> 大家好:
>>
>>  用kylin的JDBC查询,查询条件是date类型的,但是查询不出数据,以下是代码:
>>
>>  driver = (Driver) Class.*forName*(
>> "org.apache.kylin.jdbc.Driver").newInstance();
>>
>>
>>
>> Properties info = *new* Properties();
>>
>> info.put("user", "ADMIN");
>>
>> info.put("password", "KYLIN");
>>
>>
>>
>> conn = driver.connect("jdbc:kylin://IP:7070/learn_kylin",
>> info);  (此处IP代替了真实IP地址)
>>
>> state = conn.prepareStatement("select * from KYLIN_SALES
>> where part_dt = ?");
>>
>>
>>
>> SimpleDateFormat simpleTime = *new* SimpleDateFormat(
>> "-MM-dd");
>>
>> java.util.Date passUtilDate = simpleTime.parse("2013-01-01");
>>
>>
>> java.sql.Date passSqlDate = *new*
>> java.sql.Date(passUtilDate.getTime());
>>
>>
>>
>> System.*out*.println("passSqlDate>"+passSqlDate);
>>
>>
>>
>> state.setDate(1, passSqlDate);
>>
>>
>>
>> resultSet = state.executeQuery();
>>
>>
>>
>>
>>
>> 控制台日志为:
>>
>>   passSqlDate>2013-01-01
>>
>> 2016-06-23 14:19:52,591 DEBUG [main] jdbc.KylinClient:341 : Post body:
>>
>> {"sql":"select * from KYLIN_SALES where part_dt =
>> ?","project":"learn_kylin","acceptPartial":false,"params":[{"className":"java.lang.Integer","value":"15706"}]}
>>
>> 2016-06-23 14:19:52,592 DEBUG [main] wire.content:84 : <<
>> "{"userDetails":{"password":null,"username":"ADMIN","authorities":[{"authority":"ROLE_ADMIN"},{"authority":"ROLE_ANALYST"},{"authority":"ROLE_MODELER"}],"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}}"
>>
>>
>>
>> 为什么kylin把传进的参数转为了
>> "params":[{"className":"java.lang.Integer","value":"15706"}]???
>>
>>
>>
>>
>>
>> 谢谢!
>>
>>
>>
>>
>>
>
>
>
> --
> Best regards,
>
> Shaofeng Shi
>
>


-- 
Best regards,

Shaofeng Shi


Re: kylin Remote JDBC Driver problem

2016-06-23 Thread ShaoFeng Shi
Hi TongXin, would you mind to open a JIRA for this? and please provide the
Kylin version number, thank you.

2016-06-23 14:30 GMT+08:00 仇同心 :

> 大家好:
>
>  用kylin的JDBC查询,查询条件是date类型的,但是查询不出数据,以下是代码:
>
>  driver = (Driver) Class.*forName*(
> "org.apache.kylin.jdbc.Driver").newInstance();
>
>
>
> Properties info = *new* Properties();
>
> info.put("user", "ADMIN");
>
> info.put("password", "KYLIN");
>
>
>
> conn = driver.connect("jdbc:kylin://IP:7070/learn_kylin",
> info);  (此处IP代替了真实IP地址)
>
> state = conn.prepareStatement("select * from KYLIN_SALES
> where part_dt = ?");
>
>
>
> SimpleDateFormat simpleTime = *new* SimpleDateFormat(
> "-MM-dd");
>
> java.util.Date passUtilDate = simpleTime.parse("2013-01-01");
>
>
> java.sql.Date passSqlDate = *new*
> java.sql.Date(passUtilDate.getTime());
>
>
>
> System.*out*.println("passSqlDate>"+passSqlDate);
>
>
>
> state.setDate(1, passSqlDate);
>
>
>
> resultSet = state.executeQuery();
>
>
>
>
>
> 控制台日志为:
>
>   passSqlDate>2013-01-01
>
> 2016-06-23 14:19:52,591 DEBUG [main] jdbc.KylinClient:341 : Post body:
>
> {"sql":"select * from KYLIN_SALES where part_dt =
> ?","project":"learn_kylin","acceptPartial":false,"params":[{"className":"java.lang.Integer","value":"15706"}]}
>
> 2016-06-23 14:19:52,592 DEBUG [main] wire.content:84 : <<
> "{"userDetails":{"password":null,"username":"ADMIN","authorities":[{"authority":"ROLE_ADMIN"},{"authority":"ROLE_ANALYST"},{"authority":"ROLE_MODELER"}],"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}}"
>
>
>
> 为什么kylin把传进的参数转为了
> "params":[{"className":"java.lang.Integer","value":"15706"}]???
>
>
>
>
>
> 谢谢!
>
>
>
>
>



-- 
Best regards,

Shaofeng Shi


Re: 答复: Rest API for creating API

2016-06-23 Thread ShaoFeng Shi
Hi Sudeep,

We suggest to use Kylin Web UI as much as possible to define the cubes, as
there are many details in the cube JSON format, and the schema may change
in future versions;

For the cube build and query, as the API is stable, using REST is
recommended.

2016-06-23 8:55 GMT+08:00 仇同心 :

> Hi:
>
>  Hope this article can help you:
>
>http://kylin.apache.org/docs/tutorial/kylin_client_tool.html
>
>
>
>   In 1.3 x branch on a python tool, there are some good scripts, but 1.5
> x: not yet, You can refer to this.
>
>
>
>   https://github.com/apache/kylin/tree/1.3.x/tools/kylin_client_tool
>
>
>
>
>
> Thanks
>
>
>
>
>
> *发件人:* Sudeep Dey [mailto:s...@zaloni.com]
> *发送时间:* 2016年6月22日 21:26
> *收件人:* user@kylin.apache.org
> *主题:* Rest API for creating API
>
>
>
> Hi All,
>
>
>
> Is there any way of creating the Kylin cube using REST API call i.e
> whatever we need to do like defining dimension measures etc using the Kylin
> UI.
>
>
>
> I can find only REST API of building cube not creating cube.
>
>
>
> Please let me know if there is any way of achieving this.
>
>
>
> --
>
> Thanks and Regards
>
>
>
> Sudeep Dey
>
> Zaloni Technology
>
> IDC,Nexia Park
>
> Christian Basti
>
> Pin-781005
>
>
>
> "This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity
> to which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately."
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



-- 
Best regards,

Shaofeng Shi