No, Kylin supports only star schema so far, one fact table and some lookup
tables.
Please re-architect the data model to star schema.
Thanks.
Regards!
Luke Han
_____________________________
From: Tero Paananen <[email protected]>
Sent: 星期五, 六月 26, 2015 22:03
Subject: Many-to-many relationships
To: <[email protected]>
Does Kylin support many-to-many type relationships on lookup tables?
Our data structure is as follows.
We have a fact table, let's call it Document.
The Document has a unique id document.id
There is a lookup table that contains many entries per document, let's
call it Document_Rel.
Document_Rel.doc_id
Document_Rel.rel_id
Document_Rel.rel_name
The data looks like this:
Document:
id = 1
id = 2
Document_Rel:
doc_id = 1, rel_id = 1, rel_name = foo
doc_id = 1, rel_id = 2, rel_name = bar
doc_id = 1, rel_id = 3, rel_name = sna
doc_id = 1, rel_id = 4, rel_name = fu
doc_id = 2, rel_id = 1, rel_name = foo
doc_id = 2, rel_id = 5, rel_name = humpty
There are multiple relationships like this for a single Document, e.g.
Document_Rel2, Document_Rel3.
I'm getting errors on cube builds:
java.lang.IllegalStateException: Dup key found, key=[1],
value1=[1,1,foo], value2=[1,2,bar]
at org.apache.kylin.dict.lookup.LookupTable.initRow(LookupTable.java:81)
at org.apache.kylin.dict.lookup.LookupTable.init(LookupTable.java:64)
at org.apache.kylin.dict.lookup.LookupTable.<init>(LookupTable.java:52)
at
org.apache.kylin.dict.lookup.LookupStringTable.<init>(LookupStringTable.java:32)
at org.apache.kylin.cube.CubeManager.getLookupTable(CubeManager.java:419)
at
org.apache.kylin.cube.cli.DictionaryGeneratorCLI.processSegment(DictionaryGeneratorCLI.java:63)
at
org.apache.kylin.cube.cli.DictionaryGeneratorCLI.processSegment(DictionaryGeneratorCLI.java:42)
at
org.apache.kylin.job.hadoop.dict.CreateDictionaryJob.run(CreateDictionaryJob.java:53)
-TPP