Skip to Content
0

HCI-DS - Source file with changing name

Apr 29, 2017 at 01:42 PM

127

avatar image

Hi experts,

In our project, HCI-DS is reading files located in an external SFTP server. Customer wants the names of these files to include a time stamp. Consequently, the name of a source file would change everyday. For instance, the name of such a file could be "File_Product_20170428.csv" today and "File_Product_20170429.csv" tomorrow.

My understanding is that when you have a HCI task with a flat file as a source, the name of this flat file has to be constant. Is it correct?

If it is correct, can anyone propose a workaround to achieve a similar result?

I know that HCI scripts can manipulate flat files, but only if they are located on the HCI agent server ; not on a SFTP server.

Thank you,

Pierre

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Pierre Cariou May 01, 2017 at 01:58 PM
0

Hi,

I found a solution for my issue. In the first query of my dataflow (the one which is connected to the source file), in the "File Options" tab, I use a global variable instead of the standard file name :

In the preload script of the task, I added a function which populates this global variable with the correct file name, including time stamp according to system date.

If anyone has another idea, don't hesitate to propose it !

Thank you,

Pierre


scn.png (14.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
vijayaraja sahadevan May 01, 2017 at 09:16 PM
0

Hi Pierre,

You can also use "File_Product*" or "File_Product*.csv" that should process the file however you might have to move it to archive in order to not process it again.

Thanks!!

Vijay

Share
10 |10000 characters needed characters left characters exceeded