Skip to content

Instantly share code, notes, and snippets.

@ralfbecher
Last active December 15, 2015 19:59
Show Gist options
  • Save ralfbecher/5314810 to your computer and use it in GitHub Desktop.
Save ralfbecher/5314810 to your computer and use it in GitHub Desktop.
Load a random sampling data set for Data Profiling in QlikView
// In this case we want to load a 10% sampling set of the data
// The QlikView way:
data:
Sample(0.1) LOAD <your fields>
FROM <your source file>
// My way, using random function:
data:
LOAD <your fields>
FROM <your source file>
WHERE ceil(rand() * 100) <= 10;
// My tests showed that the resulting amount of sample rows were more accurate with random function,
// but mostly 10-20% higher than expected with QlikView sampling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment