kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Yang <liy...@apache.org>
Subject Re: missing a field in the SQL when creating cube
Date Thu, 07 Jan 2016 08:02:07 GMT
Em... derived dimensions are not in extraction hive SQL, but hierarchy
dimensions should appear.

If you could both the model json and cube json files, we could try to
reproduce and debug.

On Wed, Jan 6, 2016 at 8:16 AM, Luke Han <luke.hq@gmail.com> wrote:

> it is by design, hierarchy/derived dimension will not be included in
> generated SQL which read data from Hive, which associate with PK/FK.
>
> Thanks.
>
>
>
>
> Best Regards!
> ---------------------
>
> Luke Han
>
> On Wed, Jan 6, 2016 at 3:07 AM, Zhang, Zhong <zzhang@cardlytics.com>
> wrote:
>
>> Hi All,
>>
>>
>>
>> I’ve encountered a kind of weird problem. I just normally created a cube
>> step by step.
>>
>> Based on my understanding, after filling all the information in cube
>> info, data model,
>>
>> dimensions, and etc, a SQL will be generated in the SQL column. The
>> following is the
>>
>> generated SQL:
>>
>>
>>
>> SELECT
>>
>> ...
>>
>> SPENDTRIPINC.POSTALCD
>>
>> ,FLATGEO2.TOWN
>>
>> ,FLATGEO2.DMA_CODE
>>
>> ,FLATGEO2.PROVINCECD
>>
>> ,FLATGEO2.REGIONNAME
>>
>> ,FLATGEO2.MSA
>>
>> ...
>>
>> FROM FACT.SPENDTRIPINC as SPENDTRIPINC
>>
>> INNER JOIN FACT.CALENDARDATES as CALENDARDATES
>>
>> ON SPENDTRIPINC.DIMDATEKEY = CALENDARDATES.CALENDARDAYID
>>
>> INNER JOIN FACT.FLATGEO2 as FLATGEO2
>>
>> ON SPENDTRIPINC.POSTALCD = FLATGEO2.POSTALCD
>>
>>
>>
>> I do put fields "POSTALCD","TOWN","DMA_CODE","PROVINCECD","REGIONNAME"
>> and "MSA"
>>
>> from table FLATGEO2 as a hierarchy dimension. There should be a filed
>> POSTALCD
>>
>> in the SQL. But unfortunately it is not there just as you see.
>>
>>
>>
>> The weird thing is that if checking at JSON(cube) column, POSTALCD is
>> there:
>>
>> {
>>
>>       "id": 12,
>>
>>       "name": "FACTGEO",
>>
>>       "table": "FACT.FLATGEO2",
>>
>>       "column": [
>>
>>         "POSTALCD",
>>
>>         "TOWN",
>>
>>         "DMA_CODE",
>>
>>         "PROVINCECD",
>>
>>         "REGIONNAME",
>>
>>         "MSA"
>>
>>       ],
>>
>>       "derived": null,
>>
>>       "hierarchy": true
>>
>>     }
>>
>>
>>
>> Best regards,
>>
>> Zhong
>>
>>
>>
>
>

Mime
View raw message