You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by Craftman Tel <cr...@gmail.com> on 2020/04/10 13:42:04 UTC

Rearrange columns after Refresh with Flink

Hi

I am using Zeppelin with Flink to show events from Kafka. I want to order
the lines by descending ID to always show new events first. However, when
the table refresh, my table lose the setting and show always the oldest
events.

How can I achieve this?

Also, when I show tables (SHOW TABLES;), the command show me previously
executed SQL queries too. Is this a bug?

Thanks

Re: Rearrange columns after Refresh with Flink

Posted by Jeff Zhang <zj...@gmail.com>.
Each interpreter has its configuration file under
ZEPPELIN_HOME/interpreter/${interpreter_name}/interpreter-setting.json, the
setting in this file is the configuration what you see in zeppelin
interpreter setting page. Regarding hive catalog, as long as your zeppelin
server can connect to hive metastore service, you can configure it in
zeppelin.
Here's the instructions. (Section: Connect to Hive)

https://medium.com/@zjffdu/flink-on-zeppelin-part-2-batch-711731df5ad9


Craftman Tel <cr...@gmail.com> 于2020年4月11日周六 上午12:33写道:

> Ok thanks. Last question, which env.yaml file is the interpreter using? in
> my Flink cluster I am using a Hive catalog that don't show up in Zeppelin.
> Can I configure this?
>
> Thanks for the great help
>
> Le ven. 10 avr. 2020 à 16:05, Jeff Zhang <zj...@gmail.com> a écrit :
>
>> The query you see is actually the temporary table name created by
>> zeppelin to display the sql result when you run this query. I think I
>> should filter these table to avoid confusion. Thanks for the feedback.
>>
>>
>> Craftman Tel <cr...@gmail.com> 于2020年4月10日周五 下午9:57写道:
>>
>>> Thanks for the tip on order by. I was hoping the UI can handle this.
>>>
>>> I mean when I run SHOW TABLES in a cell I get the following result:
>>>
>>> select * from table1
>>> select * from table3
>>> table1
>>> table2
>>> table3
>>>
>>> The same command in Flink SQL Client gives
>>>
>>> table1
>>> table2
>>> table3
>>>
>>> Le ven. 10 avr. 2020 à 15:45, Jeff Zhang <zj...@gmail.com> a écrit :
>>>
>>>> You need to use order by in sql, e.g.
>>>> select * from sink_kafka order by event_ts desc limit 10;
>>>>
>>>> > Also, when I show tables (SHOW TABLES;), the command show me
>>>> previously executed SQL queries too. Is this a bug?
>>>>
>>>> Do you mean when you call 'show tables', it would execute preview sql
>>>> query ?
>>>>
>>>>
>>>> Craftman Tel <cr...@gmail.com> 于2020年4月10日周五 下午9:42写道:
>>>>
>>>>> Hi
>>>>>
>>>>> I am using Zeppelin with Flink to show events from Kafka. I want to
>>>>> order the lines by descending ID to always show new events first. However,
>>>>> when the table refresh, my table lose the setting and show always the
>>>>> oldest events.
>>>>>
>>>>> How can I achieve this?
>>>>>
>>>>> Also, when I show tables (SHOW TABLES;), the command show me
>>>>> previously executed SQL queries too. Is this a bug?
>>>>>
>>>>> Thanks
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards
>>>>
>>>> Jeff Zhang
>>>>
>>>
>>
>> --
>> Best Regards
>>
>> Jeff Zhang
>>
>

-- 
Best Regards

Jeff Zhang

Re: Rearrange columns after Refresh with Flink

Posted by Craftman Tel <cr...@gmail.com>.
Ok thanks. Last question, which env.yaml file is the interpreter using? in
my Flink cluster I am using a Hive catalog that don't show up in Zeppelin.
Can I configure this?

Thanks for the great help

Le ven. 10 avr. 2020 à 16:05, Jeff Zhang <zj...@gmail.com> a écrit :

> The query you see is actually the temporary table name created by zeppelin
> to display the sql result when you run this query. I think I should filter
> these table to avoid confusion. Thanks for the feedback.
>
>
> Craftman Tel <cr...@gmail.com> 于2020年4月10日周五 下午9:57写道:
>
>> Thanks for the tip on order by. I was hoping the UI can handle this.
>>
>> I mean when I run SHOW TABLES in a cell I get the following result:
>>
>> select * from table1
>> select * from table3
>> table1
>> table2
>> table3
>>
>> The same command in Flink SQL Client gives
>>
>> table1
>> table2
>> table3
>>
>> Le ven. 10 avr. 2020 à 15:45, Jeff Zhang <zj...@gmail.com> a écrit :
>>
>>> You need to use order by in sql, e.g.
>>> select * from sink_kafka order by event_ts desc limit 10;
>>>
>>> > Also, when I show tables (SHOW TABLES;), the command show me
>>> previously executed SQL queries too. Is this a bug?
>>>
>>> Do you mean when you call 'show tables', it would execute preview sql
>>> query ?
>>>
>>>
>>> Craftman Tel <cr...@gmail.com> 于2020年4月10日周五 下午9:42写道:
>>>
>>>> Hi
>>>>
>>>> I am using Zeppelin with Flink to show events from Kafka. I want to
>>>> order the lines by descending ID to always show new events first. However,
>>>> when the table refresh, my table lose the setting and show always the
>>>> oldest events.
>>>>
>>>> How can I achieve this?
>>>>
>>>> Also, when I show tables (SHOW TABLES;), the command show me previously
>>>> executed SQL queries too. Is this a bug?
>>>>
>>>> Thanks
>>>>
>>>
>>>
>>> --
>>> Best Regards
>>>
>>> Jeff Zhang
>>>
>>
>
> --
> Best Regards
>
> Jeff Zhang
>

Re: Rearrange columns after Refresh with Flink

Posted by Jeff Zhang <zj...@gmail.com>.
The query you see is actually the temporary table name created by zeppelin
to display the sql result when you run this query. I think I should filter
these table to avoid confusion. Thanks for the feedback.


Craftman Tel <cr...@gmail.com> 于2020年4月10日周五 下午9:57写道:

> Thanks for the tip on order by. I was hoping the UI can handle this.
>
> I mean when I run SHOW TABLES in a cell I get the following result:
>
> select * from table1
> select * from table3
> table1
> table2
> table3
>
> The same command in Flink SQL Client gives
>
> table1
> table2
> table3
>
> Le ven. 10 avr. 2020 à 15:45, Jeff Zhang <zj...@gmail.com> a écrit :
>
>> You need to use order by in sql, e.g.
>> select * from sink_kafka order by event_ts desc limit 10;
>>
>> > Also, when I show tables (SHOW TABLES;), the command show me previously
>> executed SQL queries too. Is this a bug?
>>
>> Do you mean when you call 'show tables', it would execute preview sql
>> query ?
>>
>>
>> Craftman Tel <cr...@gmail.com> 于2020年4月10日周五 下午9:42写道:
>>
>>> Hi
>>>
>>> I am using Zeppelin with Flink to show events from Kafka. I want to
>>> order the lines by descending ID to always show new events first. However,
>>> when the table refresh, my table lose the setting and show always the
>>> oldest events.
>>>
>>> How can I achieve this?
>>>
>>> Also, when I show tables (SHOW TABLES;), the command show me previously
>>> executed SQL queries too. Is this a bug?
>>>
>>> Thanks
>>>
>>
>>
>> --
>> Best Regards
>>
>> Jeff Zhang
>>
>

-- 
Best Regards

Jeff Zhang

Re: Rearrange columns after Refresh with Flink

Posted by Craftman Tel <cr...@gmail.com>.
Thanks for the tip on order by. I was hoping the UI can handle this.

I mean when I run SHOW TABLES in a cell I get the following result:

select * from table1
select * from table3
table1
table2
table3

The same command in Flink SQL Client gives

table1
table2
table3

Le ven. 10 avr. 2020 à 15:45, Jeff Zhang <zj...@gmail.com> a écrit :

> You need to use order by in sql, e.g.
> select * from sink_kafka order by event_ts desc limit 10;
>
> > Also, when I show tables (SHOW TABLES;), the command show me previously
> executed SQL queries too. Is this a bug?
>
> Do you mean when you call 'show tables', it would execute preview sql
> query ?
>
>
> Craftman Tel <cr...@gmail.com> 于2020年4月10日周五 下午9:42写道:
>
>> Hi
>>
>> I am using Zeppelin with Flink to show events from Kafka. I want to order
>> the lines by descending ID to always show new events first. However, when
>> the table refresh, my table lose the setting and show always the oldest
>> events.
>>
>> How can I achieve this?
>>
>> Also, when I show tables (SHOW TABLES;), the command show me previously
>> executed SQL queries too. Is this a bug?
>>
>> Thanks
>>
>
>
> --
> Best Regards
>
> Jeff Zhang
>

Re: Rearrange columns after Refresh with Flink

Posted by Jeff Zhang <zj...@gmail.com>.
You need to use order by in sql, e.g.
select * from sink_kafka order by event_ts desc limit 10;

> Also, when I show tables (SHOW TABLES;), the command show me previously
executed SQL queries too. Is this a bug?

Do you mean when you call 'show tables', it would execute preview sql query
?


Craftman Tel <cr...@gmail.com> 于2020年4月10日周五 下午9:42写道:

> Hi
>
> I am using Zeppelin with Flink to show events from Kafka. I want to order
> the lines by descending ID to always show new events first. However, when
> the table refresh, my table lose the setting and show always the oldest
> events.
>
> How can I achieve this?
>
> Also, when I show tables (SHOW TABLES;), the command show me previously
> executed SQL queries too. Is this a bug?
>
> Thanks
>


-- 
Best Regards

Jeff Zhang