Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IronistM/6933247 to your computer and use it in GitHub Desktop.
Save IronistM/6933247 to your computer and use it in GitHub Desktop.
// in this case we want to load a 10% sampling set of the data
data:
LOAD ….<your fields>…
FROM <your QVD file>
WHERE ceil(rand() * 100) <= 10; // or: rand() <= 0.1
// SAMPLE n LOAD is much faster but allocates the memory of the full data set during the LOAD
// Where rand() <= n allocates only the memory of the smaller result set which could be crucial with Big Data..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment