Hi,
This error because of some dimension table has more than 1 record when
fact table join on it through the key ‘5847,ufenqi,2016-11-11’, you can avoid
this by add key columns in the join condition.
> 在 2016年12月6日,下午3:20,[email protected] 写道:
>
> Hi,
> I have two tables users and orders, one user can make many orders.
> They're relation is one to many.
> I create the model with inner join users and orders
> Finally i build the cube and raise a Dup key Error, How can i make the
> cube?
>
> java.lang.IllegalStateException: Dup key found, key=[5847,ufenqi,2016-11-11],
> value1=[2615,product,5847,ufenqi,2014-09-09
> 23:23:31.0,338800,170,10,2016-11-11,2099-12-31],
> value2=[3635,product,5847,ufenqi,2014-09-11
> 22:51:06.0,336800,170,10,2016-11-11,2099-12-31]
> at org.apache.kylin.dict.lookup.LookupTable.initRow(LookupTable.java:85)
> at org.apache.kylin.dict.lookup.LookupTable.init(LookupTable.java:68)
> at
> org.apache.kylin.dict.lookup.LookupStringTable.init(LookupStringTable.java:79)
> at org.apache.kylin.dict.lookup.LookupTable.<init>(LookupTable.java:56)
> at
> org.apache.kylin.dict.lookup.LookupStringTable.<init>(LookupStringTable.java:65)
> at
> org.apache.kylin.cube.CubeManager.getLookupTable(CubeManager.java:674)
> at
> org.apache.kylin.cube.cli.DictionaryGeneratorCLI.processSegment(DictionaryGeneratorCLI.java:60)
> at
> org.apache.kylin.cube.cli.DictionaryGeneratorCLI.processSegment(DictionaryGeneratorCLI.java:41)
> at
> org.apache.kylin.engine.mr.steps.CreateDictionaryJob.run(CreateDictionaryJob.java:54)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> at
> org.apache.kylin.engine.mr.common.HadoopShellExecutable.doWork(HadoopShellExecutable.java:63)
> at
> org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:113)
> at
> org.apache.kylin.job.execution.DefaultChainedExecutable.doWork(DefaultChainedExecutable.java:57)
> at
> org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:113)
> at
> org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:136)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> result code:2