You should find this thread interesting. Essentially use the DatasetBuilder class to construct your dataset.