Eight Stars

tfileArchive taking Workspace as Default Directory

Hi All,

Hope everyone is doing fine.Smiley Happy

I am facing a strange issue. I have designed a Reusable Archival Job which archives Files to s3 mentioned location. Now context.SRC_DIR is some other location which is coming from the Master Job. But Everytime this Job is creating .zip file of the particular any .csv in the Location where talend is present .C:\Users\aghosh46\Desktop\Softwares\TOS_BD-20170623_1246-V6.4.1\TOS_BD-20170623_1246-V6.4.1. I have placed a tfiledelete which operation is to delete .zip files which is not working as a result. using Talend Open Studio 6.4.1. Anyone with any help. @rhall_2_0 , @manodwhb@TRF will be really appreciated

Workspace_Save.JPG

Archival_Issue.JPG

7 REPLIES
Eight Stars

Re: tfileArchive taking Workspace as Default Directory

For Testing purpose When I am putting the Value of SRC_DIR Context Value in the Directory Field of tfileArchive it is still creating those .zip in C:\Users\myusername\Desktop\Softwares\TOS_BD-20170623_1246-V6.4.1\TOS_BD-20170623_1246-V6.4.1. How this is happening?any clue

@jlolling@xdshi

Twelve Stars

Re: tfileArchive taking Workspace as Default Directory

@abhi90,it is bit difficult to replicate the issue.i suggest you to check tfileArchive with hard coded values test the component alone and then use the context values.

Manohar B
Eight Stars

Re: tfileArchive taking Workspace as Default Directory

Hi @manodwhb,

was actually checking that. But strange thing is still that Location it is picking i.e C:\Users\myusername\Desktop\Softwares\TOS_BD-20170623_1246-V6.4.1\TOS_BD-20170623_1246-V6.4.1 Smiley Sad 

Forteen Stars TRF
Forteen Stars

Re: tfileArchive taking Workspace as Default Directory

"context.SRC_DIR is some other location which is coming from the Master Job"

are you sure SRC_DIR is passed from parent to child job?

the location where the archive file is created is the default for every output file as soon the target directory is not defined (a common mistake when context or global variable is null or not defined).


TRF
Twelve Stars

Re: tfileArchive taking Workspace as Default Directory

@abhi90,since i was using the tfileArchive, i do not see any problem ,when i had coded the value is was creating .zip file. you need to be sure about the values of context.SRC_DIR .

Manohar B
Eight Stars

Re: tfileArchive taking Workspace as Default Directory

Hi @TRF,

Yes context.SRC_DIR I am passing from Master Job. as it will be reusable for Archival so it will pass from Master to this Child Job. in tFileArchive also under Directory I am giving context.SRC_DIR as well as tried with Hardcoded Value. Still it is been creating in Workspace

Seventeen Stars

Re: tfileArchive taking Workspace as Default Directory

Hi

This is due to a somewhat ill-considered attitude. But normally it is practically a duty to set the path for the archive anyway and not just to adopt the default settings.