how to create new folder from tfileoutputdelimiter component ??/

Five Stars

how to create new folder from tfileoutputdelimiter component ??/

i have to create the folder in tfileoutputdelimiter and then create csv file in that folder.

 

example:

tfileoutputdelimiter:

filename path :

context.tmp_folder+"/new_folder/"+context.filename

1. context.tmp_folder is having path 

2. new_folder needs to create after tmp_folder path

3. context.filename is having csv file name

 

here ia m not able to create new folder as above format?

 please let me know how to proceed..

 


Accepted Solutions
Nine Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

please provide the path and folder details in context group for context.tmp_data_path.

Regards,

Veeru Boppudi

All Replies
Nine Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

Have you selected the option - "Create directory if doesn't exists" under the Advanced settings.

 

tFileOutputDelimited-1.JPG

Five Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

i have checked this option ..but also folder is not created.

Nine Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

Are you getting any error?

 

Regards,

Veeru Boppudi
Five Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

yes,m getting the below error.

java.io.FileNotFoundException: D:\tmp_path\new_folder\filename_error.csv (The system cannot find the path specified)

Nine Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

If you are running talend on windows try the below

folderCreation.PNGfolderCreation1.PNGfolderCreation2.PNG

 

in Context variable for Folder path use forward slash "/" instead of "\".

 

Regards,

Veeru Boppudi
Nine Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

Tried to re-pro your use case but didn't find any such error occurrence. Would it be possible if you could show the job layout and the configuration for your tFileOutputDelimited.

Five Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

image.png

tmp_data path is taking from property file. +

newfoldershould create +

context.filename is taking from source_file_name_error.csv

 

error:: java.io.FileNotFoundException: ---->  path  (The system cannot find the path specified)

 

image.png 

 

Nine Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

please provide the path and folder details in context group for context.tmp_data_path.

Regards,

Veeru Boppudi
Five Stars

Re: how to create new folder from tfileoutputdelimiter component ??/

i cant hard code the path in context group.. path will taken from the config property file. When we move the code to test environment it should not have the problem.