Add date variable to dataAccess.name value.

49 views
Skip to first unread message

Charles Ma

unread,
Apr 15, 2012, 2:57:12 AM4/15/12
to Data Loader Cliq
Hi,

How can I add a date variable into the "value=" of the
"dataAccess.name?

Currently I have have the entry line as:
<entry key="dataAccess.name" value="C:\Users\...\Orders 20120414.csv"/
>

But each day, the new Orders file changes date, so I want to be able
to create a rolling variable with today's date:
<entry key="dataAccess.name" value="C:\Users\...\Orders
{DATE_FORMAT(NOW(),'%Y%m%d')}.csv"/>

Can this be done? If so, how?

Really appreciate your help,
Charles

theswami

unread,
Apr 16, 2012, 1:37:53 PM4/16/12
to data-loa...@googlegroups.com
It has to be done in the script file.  
If you look at the .bat file in your process directory, there are some lines that can be uncommented to get you started.  Basically, it will create a date-based name and copy the file.  

It looks like you are doing an insert/update.  In that case, you could add a few lines to the script to copy the date-based file (i.e. 01032012-import.csv) to a static name that is set in process-conf.xml (i.e. import.csv).

Hope this helps,
Vijay

Charles Ma

unread,
Apr 16, 2012, 3:26:22 PM4/16/12
to Data Loader Cliq
Hi theswami,

Thanks for the tip. Unfortunately, I'm not a programmer, so this may
be above my skills. If it's not too much trouble, would you be so kind
to write up a example code for me?

Your help would be much appreciated!
Thank you,
Charles

theswami

unread,
Apr 19, 2012, 1:46:36 PM4/19/12
to data-loa...@googlegroups.com
It would take some time to figure out for me too.  If I get some time, I'll see what I can do.
If you need programmers for simple projects, you might try something like freelancer or elance.

Regards,
Vijay
Reply all
Reply to author
Forward
0 new messages