@@ -18,9 +18,21 @@ const cubeDefs: CubeDefinition[] = [
1818 isView : true ,
1919 cubes : [
2020 { join_path : ( users ) => 'users' , includes : '*' } ,
21- { joinPath : ( ) => 'clients' , includes : '*' } ,
21+ { joinPath : ( ) => 'users. clients' , includes : '*' } ,
2222 ]
2323 } ,
24+ {
25+ name : 'clients' ,
26+ measures : {
27+ Count : { type : 'count' , sql : ( ) => 'sql' } ,
28+ Sum : { type : 'sum' , sql : ( ) => 'sql' } ,
29+ } ,
30+ dimensions : {
31+ UserId : { type : 'number' , sql : ( ) => 'user_id' } ,
32+ Name : { type : 'string' , sql : ( ) => 'user_name' } ,
33+ CreatedAt : { type : 'time' , sql : ( ) => 'created_at' } ,
34+ } ,
35+ } ,
2436 {
2537 name : 'users' ,
2638 measures : {
@@ -45,21 +57,9 @@ const cubeDefs: CubeDefinition[] = [
4557 isView : true ,
4658 cubes : [
4759 { join_path : ( ) => 'emails' , includes : '*' } ,
48- { joinPath : ( ) => 'users_view' , includes : [ 'userId ' ] } ,
60+ { joinPath : ( ) => 'users_view' , includes : [ 'UserId ' ] } ,
4961 ]
5062 } ,
51- {
52- name : 'clients' ,
53- measures : {
54- Count : { type : 'count' , sql : ( ) => 'sql' } ,
55- Sum : { type : 'sum' , sql : ( ) => 'sql' } ,
56- } ,
57- dimensions : {
58- UserId : { type : 'number' , sql : ( ) => 'user_id' } ,
59- Name : { type : 'string' , sql : ( ) => 'user_name' } ,
60- CreatedAt : { type : 'time' , sql : ( ) => 'created_at' } ,
61- } ,
62- } ,
6363 {
6464 name : 'emails' ,
6565 measures : {
@@ -72,6 +72,17 @@ const cubeDefs: CubeDefinition[] = [
7272 MailCreatedAt : { type : 'time' , sql : ( ) => 'created_at' } ,
7373 } ,
7474 } ,
75+ {
76+ name : 'checkins' ,
77+ measures : {
78+ CheckinsCount : { type : 'count' , sql : ( ) => 'sql' } ,
79+ SumCheckins : { type : 'sum' , sql : ( ) => 'sql' } ,
80+ } ,
81+ dimensions : {
82+ checkinId : { type : 'number' , sql : ( ) => 'user_id' } ,
83+ CheckinCreatedAt : { type : 'time' , sql : ( ) => 'created_at' } ,
84+ } ,
85+ } ,
7586] ;
7687
7788describe ( 'Cube Symbols Compiler' , ( ) => {
0 commit comments