kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhang, Zhong" <zzh...@cardlytics.com>
Subject missing a field in the SQL when creating cube
Date Tue, 05 Jan 2016 19:07:55 GMT
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