cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic File creation with Date at the end of File name

Former Member
0 Kudos

Hi Experts, I have 20 Data Flows in One Work Flow, Each Data Flow  creates one file in CSV format, my requirement is the file name for the CSV  should be name followed by current date For Example like TEST-2014_11_18 should be created Suggesion Please Thanks

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Uhdam,

Below process could help you.

  1. Create a Global Variable, to hold the file name.
  2. Place your dataflows in seperate workflows for each.
  3. Add a script to the workflow and connect it to your dataflow, generate the filename in the script and assign it to the global variable. {This could be your script : $GV_FileName = 'Test1'||substr(sysdate(),0,10)||'.csv';}
  4. Use the Global variable as your filename in the dataflow.

Hope this helps you meet requirement.

Regards

Santhosh

Answers (5)

Answers (5)

former_member208363
Active Participant
0 Kudos

HI Uhdham Reddy,

PLease select 'answered' to track the thread

it was correctlyanswered. You 

Former Member
0 Kudos

Thanks everyone for your effort, i have already implemented the above logics, that was not my requirement As per your suggesion, every dataflow will have a script and the script and dataflow should be in workflow If i put  script in front of every data flow in Workflow that has 30 data flow it looks weared

former_member208363
Active Participant
0 Kudos

Hi Uhdam,

Add the sweekriti lama script before the Data Flow.

Please check the enclosed screen.

I tried with sweekriti lama solution. It is working.

Former Member
0 Kudos

Hi Uhdam,

In the script type the following code:

$G_CurrentDate= sysdate();

print($G_CurrentDate);

$G_Filename= 'TEST_'||$G_CurrentDate||'.csv';

print($G_Filename);

Declare the variable $G_CurrentDate as date and $G_Filename as varchar.

Place this variable $G_Filename in the File name(s) of the File Format Editor.

former_member208363
Active Participant
0 Kudos

As par as I know, This is not possible.