Quote:
Originally Posted by vasanth.v
1. We have a database table containing a list of file paths. We created a channel whose source is a Database reader. We need to create another source to read all the files from that database table and move it to another path. It is possible to create multiple sources like one database reader and one file reader. If so how can we achieve it. If not what are the other possibilities to read files whose paths are in the database.
|
Selecting the file paths out of the database is easy enough with a Database Reader. Once you've done that, just iterate through the paths in a transformer, and use
FileUtils to do whatever you need to.
Quote:
Originally Posted by vasanth.v
2. Is it possible to create a file reader whose path can be changed dynamically.
|
It is; you can use Velocity template variables in the File Reader directory field. However that takes effect only when the channel is deployed, not for each polling window. If you need to use a different directory for every poll, you can use a JavaScript Reader instead.
Quote:
Originally Posted by vasanth.v
3. How do I create a file reader which can read all files recursively from the inside folders.
|
This has been added in 3.0:
MIRTH-1441. In 2.x, you would have to use a JavaScript Reader instead.