dw.populate: Populate DW data

Description Usage Arguments Details See Also Examples

View source: R/dw_populate.R

Description

Populate sample DW data. By default star, see scenario arg for others.

Usage

1
2
dw.populate(N = 1e+05, K = 100, S = 1, scenario = "star",
  setkey = TRUE, verbose = getOption("dwtools.verbose"))

Arguments

N

integer facts volume

K

groups size

S

integer used in set.seed

scenario

character in c("fact","star","denormalize")

setkey

logical used only for scenario "star", default TRUE makes dimensions populated with keys already. For non-key benchmarks use FALSE, also remember about getOption("datatable.auto.index"=FALSE),

verbose

integer print sub statuses

Details

The following case scenario="denormalize" will invoke lookup for full columns set in all the dimensions. On the real data it is advised to use scenario="star" and later denormalize using joinbyv function where you can provide subsets of columns on each lookup.

See Also

joinbyv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
suppressPackageStartupMessages(library(dwtools))

X = dw.populate() # scenario="star"
lapply(X, head)

Z = dw.populate(scenario="denormalize")
print(Z)

SALES = dw.populate(scenario="fact")
print(SALES)

jangorecki/dwtools documentation built on May 18, 2019, 12:24 p.m.