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 <[email protected]> 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 > > >
