You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lens.apache.org by Tao Yan <ty...@linkedin.com> on 2016/09/01 00:36:42 UTC

Re: Define Nested Structure

Could you provide an example of defining a struct in a dimension / fact?

Thanks!



On Thu, Aug 25, 2016 at 3:36 PM, Tao Yan <ty...@linkedin.com> wrote:

> Any update on this?
>
> On Tue, Aug 23, 2016 at 5:11 PM, Tao Yan <ty...@linkedin.com> wrote:
>
>> Is there any example for the struct type definition?
>>
>> Thanks!
>>
>> On Tue, Aug 23, 2016 at 4:55 PM, amareshwarisr . <am...@gmail.com>
>> wrote:
>>
>>> Tao,
>>>
>>> You can try defining them as struct type - similar to hive. But not sure
>>> if there are any gaps.
>>>
>>> Thanks
>>>
>>> On Wed, Aug 24, 2016 at 5:22 AM, Tao Yan <ty...@linkedin.com> wrote:
>>>
>>>> Hi Lens Developer,
>>>>
>>>> I am trying to define a table with nested columns in Lens, and didn't
>>>> find the corresponding xml attributes or properties for that. So, I wonder
>>>> if it is possible to do that. For example:
>>>>
>>>> test-cube.xml:
>>>>
>>>> ...
>>>> <dim_attribute name="region" _type="STRING" />
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *<dim_attribute name="EventHeader" _type="record" >    <fields>
>>>> <field name="memberId" _type="int"/>        <field name="viewerUrn"
>>>> _type="int"/>        <field name="time" _type="int"/>        ...
>>>> </fields></dim_attribute>*
>>>> <dim_attribute name="product_name" _type="STRING" />
>>>> ...
>>>>
>>>>
>>>> Thanks,
>>>> --
>>>>
>>>> *Tao Yan*
>>>> Software Engineer
>>>> Data Analytics Infrastructure Tools and Services
>>>>
>>>>
>>>>
>>>> 206.250.5345
>>>> tyan@linkedin.com
>>>> https://www.linkedin.com/in/taousc
>>>>
>>>
>>>
>>
>>
>> --
>>
>> *Tao Yan*
>> Software Engineer
>> Data Analytics Infrastructure Tools and Services
>>
>>
>>
>> 206.250.5345
>> tyan@linkedin.com
>> https://www.linkedin.com/in/taousc
>>
>
>
>
> --
>
> *Tao Yan*
> Software Engineer
> Data Analytics Infrastructure Tools and Services
>
>
>
> 206.250.5345
> tyan@linkedin.com
> https://www.linkedin.com/in/taousc
>



-- 

*Tao Yan*
Software Engineer
Data Analytics Infrastructure Tools and Services



206.250.5345
tyan@linkedin.com
https://www.linkedin.com/in/taousc

Re: Define Nested Structure

Posted by "amareshwarisr ." <am...@gmail.com>.
You can define type
as array&lt;struct&lt;merchant&#58;string&#44;pipeline&#58;string&gt;&gt; -
which is an array of struct.

On Thu, Sep 1, 2016 at 6:06 AM, Tao Yan <ty...@linkedin.com> wrote:

> Could you provide an example of defining a struct in a dimension / fact?
>
> Thanks!
>
>
>
> On Thu, Aug 25, 2016 at 3:36 PM, Tao Yan <ty...@linkedin.com> wrote:
>
>> Any update on this?
>>
>> On Tue, Aug 23, 2016 at 5:11 PM, Tao Yan <ty...@linkedin.com> wrote:
>>
>>> Is there any example for the struct type definition?
>>>
>>> Thanks!
>>>
>>> On Tue, Aug 23, 2016 at 4:55 PM, amareshwarisr . <am...@gmail.com>
>>> wrote:
>>>
>>>> Tao,
>>>>
>>>> You can try defining them as struct type - similar to hive. But not
>>>> sure if there are any gaps.
>>>>
>>>> Thanks
>>>>
>>>> On Wed, Aug 24, 2016 at 5:22 AM, Tao Yan <ty...@linkedin.com> wrote:
>>>>
>>>>> Hi Lens Developer,
>>>>>
>>>>> I am trying to define a table with nested columns in Lens, and didn't
>>>>> find the corresponding xml attributes or properties for that. So, I wonder
>>>>> if it is possible to do that. For example:
>>>>>
>>>>> test-cube.xml:
>>>>>
>>>>> ...
>>>>> <dim_attribute name="region" _type="STRING" />
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *<dim_attribute name="EventHeader" _type="record" >    <fields>
>>>>> <field name="memberId" _type="int"/>        <field name="viewerUrn"
>>>>> _type="int"/>        <field name="time" _type="int"/>        ...
>>>>> </fields></dim_attribute>*
>>>>> <dim_attribute name="product_name" _type="STRING" />
>>>>> ...
>>>>>
>>>>>
>>>>> Thanks,
>>>>> --
>>>>>
>>>>> *Tao Yan*
>>>>> Software Engineer
>>>>> Data Analytics Infrastructure Tools and Services
>>>>>
>>>>>
>>>>>
>>>>> 206.250.5345
>>>>> tyan@linkedin.com
>>>>> https://www.linkedin.com/in/taousc
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Tao Yan*
>>> Software Engineer
>>> Data Analytics Infrastructure Tools and Services
>>>
>>>
>>>
>>> 206.250.5345
>>> tyan@linkedin.com
>>> https://www.linkedin.com/in/taousc
>>>
>>
>>
>>
>> --
>>
>> *Tao Yan*
>> Software Engineer
>> Data Analytics Infrastructure Tools and Services
>>
>>
>>
>> 206.250.5345
>> tyan@linkedin.com
>> https://www.linkedin.com/in/taousc
>>
>
>
>
> --
>
> *Tao Yan*
> Software Engineer
> Data Analytics Infrastructure Tools and Services
>
>
>
> 206.250.5345
> tyan@linkedin.com
> https://www.linkedin.com/in/taousc
>