Learn R Programming

dwtools (version 0.8.3.9)

dw.populate: Populate DW data

Description

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

Usage

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

Run this code
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)

Run the code above in your browser using DataLab