Skip to Content
avatar image
Former Member

HCI-DS - Source file with changing name

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    May 01, 2017 at 01:58 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 01, 2017 at 09:16 PM

    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

    Add comment
    10|10000 characters needed characters exceeded