File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ l = list(
109109lapply(l [- 1L ], `[` , j = if (.N > 1L ) .SD , by = " id1" ) # # duplicated rows
110110try(mergelist(l , on = " id1" ))
111111
112- # # 'star schema' and 'snowflake schema' examples
112+ # # 'star schema' and 'snowflake schema' examples (realistic data sizes)
113113
114114# ## populate fact: US population by state and date
115115
@@ -144,9 +144,10 @@ rm(gt, tt)
144144# ## denormalize 'star schema'
145145
146146l = list (fact , time , geog )
147- ans = mergelist(l )
147+ str(l )
148+ mergelist(l )
148149
149- rm(l , ans )
150+ rm(l )
150151
151152# ## turn 'star schema' into 'snowflake schema'
152153
@@ -155,6 +156,7 @@ make.lvl = function(x, cols) {
155156 lvl = x [, unique(.SD ), .SDcols = cols ]
156157 setkeyv(lvl , cols [1L ])
157158 setindexv(lvl , as.list(cols ))
159+ lvl
158160}
159161time = list (
160162 date = make.lvl(
@@ -174,9 +176,10 @@ geog = list(
174176
175177# ### left join all
176178l = c(list (fact = fact ), time , geog )
177- ans = mergelist(l )
179+ str(l )
180+ mergelist(l )
178181
179- rm(ans )
182+ rm(l )
180183# ### merge hierarchies alone, reduce sizes in merges of geog dimension
181184ans = mergelist(list (
182185 fact ,
You can’t perform that action at this time.
0 commit comments