You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by Kevin Niemann <ke...@gmail.com> on 2016/09/16 21:21:54 UTC

Embedding %html within %table

According to the example here
https://zeppelin.apache.org/docs/0.6.1/displaysystem/basicdisplaysystem.html#table
it is possible to use %html within a %table paragraph and get benefits of
both. However when I run that it appears to render as HTML only and no
native table view.


Is my syntax incorrect or does anyone else have this same issue? e.g.


print(s"""%table

name\tsize\tquantity

%html <img src='
https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Sun_symbol.svg/50px-Sun_symbol.svg.png'
/>sun\t100\t50

%html <img src='
https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Moon_symbol_crescent.svg/25px-Moon_symbol_crescent.svg.png'
/>moon\t10\t20""")


Thanks,

kevin

Re: Embedding %html within %table

Posted by Kevin Niemann <ke...@gmail.com>.
Hi Hyung,

I tested and that fixed my issue.

Thanks

On Sun, Sep 18, 2016 at 6:44 AM, Hyung Sung Shim <hs...@nflabs.com> wrote:

> Hi Kevin.
> Could you try https://github.com/apache/zeppelin/pull/1433 ?
> It would be great if you could let me know the result.
> Thanks.
>
> 2016-09-17 10:15 GMT+09:00 moon soo Lee <mo...@apache.org>:
>
>> I'm not sure since when, but %html inside of the cell doesn't work if it
>> is first column. If you add any other column which is not using %html on
>> left, table will be rendered correctly.
>>
>> Hope this helps
>>
>> Thanks,
>> moon
>>
>>
>> On Fri, Sep 16, 2016 at 2:21 PM Kevin Niemann <ke...@gmail.com>
>> wrote:
>>
>>> According to the example here https://zeppelin.apache.o
>>> rg/docs/0.6.1/displaysystem/basicdisplaysystem.html#table it is
>>> possible to use %html within a %table paragraph and get benefits of both.
>>> However when I run that it appears to render as HTML only and no native
>>> table view.
>>>
>>>
>>> Is my syntax incorrect or does anyone else have this same issue? e.g.
>>>
>>>
>>> print(s"""%table
>>>
>>> name\tsize\tquantity
>>>
>>> %html <img src='https://upload.wikimedia.org/wikipedia/commons/thumb/6/
>>> 6f/Sun_symbol.svg/50px-Sun_symbol.svg.png' />sun\t100\t50
>>>
>>> %html <img src='https://upload.wikimedia.org/wikipedia/commons/thumb/2/
>>> 2a/Moon_symbol_crescent.svg/25px-Moon_symbol_crescent.svg.png'
>>> />moon\t10\t20""")
>>>
>>>
>>> Thanks,
>>>
>>> kevin
>>>
>>
>

Re: Embedding %html within %table

Posted by Hyung Sung Shim <hs...@nflabs.com>.
Hi Kevin.
Could you try https://github.com/apache/zeppelin/pull/1433 ?
It would be great if you could let me know the result.
Thanks.

2016-09-17 10:15 GMT+09:00 moon soo Lee <mo...@apache.org>:

> I'm not sure since when, but %html inside of the cell doesn't work if it
> is first column. If you add any other column which is not using %html on
> left, table will be rendered correctly.
>
> Hope this helps
>
> Thanks,
> moon
>
>
> On Fri, Sep 16, 2016 at 2:21 PM Kevin Niemann <ke...@gmail.com>
> wrote:
>
>> According to the example here https://zeppelin.apache.
>> org/docs/0.6.1/displaysystem/basicdisplaysystem.html#table it is
>> possible to use %html within a %table paragraph and get benefits of both.
>> However when I run that it appears to render as HTML only and no native
>> table view.
>>
>>
>> Is my syntax incorrect or does anyone else have this same issue? e.g.
>>
>>
>> print(s"""%table
>>
>> name\tsize\tquantity
>>
>> %html <img src='https://upload.wikimedia.org/wikipedia/commons/thumb/6/
>> 6f/Sun_symbol.svg/50px-Sun_symbol.svg.png' />sun\t100\t50
>>
>> %html <img src='https://upload.wikimedia.org/wikipedia/commons/thumb/2/
>> 2a/Moon_symbol_crescent.svg/25px-Moon_symbol_crescent.svg.png'
>> />moon\t10\t20""")
>>
>>
>> Thanks,
>>
>> kevin
>>
>

Re: Embedding %html within %table

Posted by moon soo Lee <mo...@apache.org>.
I'm not sure since when, but %html inside of the cell doesn't work if it is
first column. If you add any other column which is not using %html on left,
table will be rendered correctly.

Hope this helps

Thanks,
moon

On Fri, Sep 16, 2016 at 2:21 PM Kevin Niemann <ke...@gmail.com>
wrote:

> According to the example here
> https://zeppelin.apache.org/docs/0.6.1/displaysystem/basicdisplaysystem.html#table
> it is possible to use %html within a %table paragraph and get benefits of
> both. However when I run that it appears to render as HTML only and no
> native table view.
>
>
> Is my syntax incorrect or does anyone else have this same issue? e.g.
>
>
> print(s"""%table
>
> name\tsize\tquantity
>
> %html <img src='
> https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Sun_symbol.svg/50px-Sun_symbol.svg.png'
> />sun\t100\t50
>
> %html <img src='
> https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Moon_symbol_crescent.svg/25px-Moon_symbol_crescent.svg.png'
> />moon\t10\t20""")
>
>
> Thanks,
>
> kevin
>