Dynamically generating target file names
By David Allan on Jul 09, 2007
A little known fact is how to dynamically create a file name for a map that has a file as a target (for example). The configuration property 'Target Data File Name' allows a data file name to be entered, it is actually possible to insert a PLSQL expression here given the correct formatting. This let's you define any valid PLSQL expression, so you could add a date to a file name for example.
In the example below append the SYSDATE to the string 'orders' and this is the name of my file (a file name such as 'orders05-JUL-07' will be written).
The generated code will be like the following snippet with the expression
being evaluated in PLSQL:
"ORDERS_FILE_Fh" := UTL_FILE.FOPEN(
Basically the file name you type will be wrapped in single quotes, so
if you use quotes in your expression which end up with a valid PLSQL
expression you can do what you want.