You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2017-01-05 06:14:38

amit2676
Member
107 posts

amit2676 said:

tFILEEXIST

Dear Users,

I want to implement the file exist in the dir or no after archival process is over ,
i made the following job:-


mini_blob_20170104-2111.png

Configuration of each component is as follows:-

tfilelist:-


mini_blob_20170104-2111.png

tfileexist:-

mini_blob_20170104-2112.png

if condition:

mini_blob_20170104-2113.png
2nd if condition if file dosent exist:-


mini_blob_20170104-2114.png

Its throwing null pointer exception in tfileexist, any idea please help
thanks.

Offline

#2 2017-01-05 06:22:48

shong
Talend Team


shong said:

Re: tFILEEXIST

Hi 
What is the full error message? Can you please upload a screenshot of the whole job?

Regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#3 2017-01-06 19:01:16

amit2676
Member
107 posts

amit2676 said:

Re: tFILEEXIST

shong wrote:

Hi 
What is the full error message? Can you please upload a screenshot of the whole job?

Regards
Shong

Dear shong,
Below is the screen shot of full job:-
mini_blob_20170106-0955.png

Error message:-

Starting job FILE_EXIST at 20:56 06/01/2017.

[statistics] connecting to socket on port 3726
[statistics] connected
[FATAL]: sapphire_611.file_exist_0_1.FILE_EXIST - tFileExist_1 null
Exception in component tFileExist_1
java.lang.NullPointerException
    at sapphire_611.file_exist_0_1.FILE_EXIST.tFileList_1Process(FILE_EXIST.java:588)
    at sapphire_611.file_exist_0_1.FILE_EXIST.runJobInTOS(FILE_EXIST.java:1129)
    at sapphire_611.file_exist_0_1.FILE_EXIST.main(FILE_EXIST.java:963)
[statistics] disconnected
Job FILE_EXIST ended at 20:56 06/01/2017. [exit code=1]

Offline

#4 2017-01-09 04:38:30

shong
Talend Team


shong said:

Re: tFILEEXIST

I think I have replied you in another topic, this is because you don't use the right global variable, please check it. 


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#5 2017-01-09 06:02:05

amit2676
Member
107 posts

amit2676 said:

Re: tFILEEXIST

shong wrote:

I think I have replied you in another topic, this is because you don't use the right global variable, please check it. 

Dear Shong,
I used the right global variable as said by u
((Boolean)globalMap.get("tFileExists"))
and 
!((Boolean)globalMap.get("tFileExists"))
But i am getting error in tFileexist component
error:null pointer exception
mini_blob_20170108-2100.png

I have used the global variable in tfileexist as 

((String)globalMap.get(tFileList_1_CURRENT_FILEPATH))

Offline

#6 2017-01-10 07:09:34

shong
Talend Team


shong said:

Re: tFILEEXIST

I used the right global variable as said by u[size=2][font=Verdana, Helvetica, Arial, sans-serif][/font][/size]
((Boolean)globalMap.get("tFileExists"))[size=2][font=Verdana, Helvetica, Arial, sans-serif][/font][/size]
and [size=2][font=Verdana, Helvetica, Arial, sans-serif][/font][/size]
!((Boolean)globalMap.get("tFileExists"))

Are you sure you input the correct expression? To me, the error is caused by the global variable that does not exist.
The correct expression is:
((Boolean)globalMap.get("tFileExist_1_EXISTS"))
Regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#7 2017-01-11 05:41:18

amit2676
Member
107 posts

amit2676 said:

Re: tFILEEXIST

shong wrote:
I used the right global variable as said by u[size=2][font=Verdana, Helvetica, Arial, sans-serif][/font][/size]
((Boolean)globalMap.get("tFileExists"))[size=2][font=Verdana, Helvetica, Arial, sans-serif][/font][/size]
and [size=2][font=Verdana, Helvetica, Arial, sans-serif][/font][/size]
!((Boolean)globalMap.get("tFileExists"))

Are you sure you input the correct expression? To me, the error is caused by the global variable that does not exist.
The correct expression is:
((Boolean)globalMap.get("tFileExist_1_EXISTS"))
Regards
Shongif 

Dear Shong,
You are right , there was error in the global variable , i am able to run now .
Now what is happening i am able to check if file is present it says file exist.
But when file is not there it doesn't display file dose not exist.
tfilelist doesn't return anything may be thats why it doesn't display file doesn't exist.
How to handle this?

Offline

#8 2017-01-13 07:23:45

shong
Talend Team


shong said:

Re: tFILEEXIST

Hi  
I don't understand your job logic, tfilelist is used to iterate each file that matches the file mark, and you use the current file path on tFileExist to check if the file exist? The result of tFileExist should be always true in your case. 

Regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy