You could use the LineSender program to provide sample input from a file to Odysseus.
The source code can be found here: https://git.swl.informatik.uni-oldenburg.de/projects/ODYDATGEN/repos/linesender/browse
A runnable jar can be downloaded here: https://odysseus.informatik.uni-oldenburg.de/download/linesender/linesender.jar
to see a list of parameters:
This program reads a CSV file and sends each CSV file via TCP to a connected TCP client. For each new connected client, the reading starts from the beginning of the file. If you set the repeat flag, the content of the CSV file is sent again and again to simulate a never ending input stream. You could limit the data rate with the delay flag.
If you have the following CSV file:
and you have started the sender on port 9876. You could use the following Odysseus query to access the content:
Remark: If you use repeat, you need to assure at the client side, that the timestamps are increasing. In the above example this is simply done by using system time but when using application time (i.e. providing timestamp datatypes) you will need to increase the timestamps manually,
Here, we first check, if the new start timestamp is lower than the old one. This means, the input file has started from the beginning and nextRound is set to true.
Then the TIMESTAMP operator creates timestamps from the B attribute values and increases the concounter each time, nextRound is true. Here we use 10 as a maximum value.