Skip to main content

I am writing out to Access (JDBC) and want to use an attribute created in the routine for the filename.

I have tried entering @Value(Filename) in the Database Path of the writer but it just creates a database called @Value(Filename).mdb

Any ideas how I can get the attribute as the filename.

The only option I have found is to use a user parameter to do it but I want a date stamp as part of the filename which is created in the routine.

Thanks

 

Hi @sebkingsley

So, what you need to use is a Dataset Fanout. Go to the writer parameters in the Navigator window, and turn on Dataset Fanout. Select the folder to write to and then pick the attribute in the Fanout Expression field.

If you want the datetime in there, then construct that into your attribute using functions like DateTimeNow() or you can actually embed those functions directly into the fanout expression.

Coincidentally, I'm just writing up a post/article about how to do exactly this. I should be done by Friday, so keep an eye out for the "Question of the Week" post on Friday for a full list of instructions.


Reply