[Composite DataSources]Load Activity

This recipe illustrates how to use the composite datasource processor to build a random report generator.

  1. Random-Report-ElixirSamples.ds
  2. It starts off using a FileSystem DS to read in all the files within a repository.
  3. This dataset is then filtered to return only the rml files.
  4. A JavaScript variable ( count ) is used to register an ID to each record.
  5. Sequence-Number.dsThis ds receives a count value to return a count of random data ( a random number, and a random value based on Mime-Type-Extension.ds).
  6. We will use a lookup processor to form a set of data which consists of the “File-Extension”/“Mime-Type”/“Seq_Num”.Note: There is an additional dev processor to return the “seq_num” from equence-Number.ds
  7. The 2 flows of data are then joined together by the “Seq_Num”.With this composite datasource, you now have a random generator which is based on a filesystem, e.g ElixirSamples. You can control the return output count via parameter and return you the target output file (i.e it’s mime-type and file extension)
  8. This set of data can now be based to the Activity.Job to trigger the report generation.

To download the necessary files for this recipe, refer to the attached ZIP file.
Load-Activity.zip