#1 2008-12-01 16:26:27

fwalle
Member
Registered: 2008-08-01
Posts: 50

Properties of a fields

I need to test if a field is empty ...
i try the field size of the component poperties but it always return null...

TIS 2.4.1 r16077

Offline

#2 2008-12-02 06:58:28

shong
Talend team
Registered: 2007-08-29
Posts: 10297
Website

Re: Properties of a fields

Hello

Please upload some screenshot of your job.

Best regards

         shong


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

Offline

#3 2008-12-02 09:30:54

fwalle
Member
Registered: 2008-08-01
Posts: 50

Re: Properties of a fields

oopss I make a mistake

I want to say I need to know if a FILE is empty or not ... sorry

So I try the componenet properties of a FILE and the field size is always at null...

Sorry again

Offline

#4 2008-12-02 13:21:59

fwalle
Member
Registered: 2008-08-01
Posts: 50

Re: Properties of a fields

No body ??
No thing ???

Offline

#5 2008-12-02 13:58:05

plegall
Member
Registered: 2006-09-19
Posts: 1586
Website

Re: Properties of a fields

fwalle, you mean you're creating a component and you want to test the emptiness of a property field from the JET template, or are you in a tJava component code?

Offline

#6 2008-12-02 14:00:18

fwalle
Member
Registered: 2008-08-01
Posts: 50

Re: Properties of a fields

NO !!!

I just want to know if a FILE (toto.txt) is empty or not in talend ... ???

I test with the component tFileProperties but it dosesn't work !!

Thanks

Offline

#7 2008-12-02 15:38:36

plegall
Member
Registered: 2006-09-19
Posts: 1586
Website

Re: Properties of a fields

With Talend Open Studio 3.0.1, Java project, I correctly have 0 lines with tFileRowCount and the size is 0 with tFileProperties.

Offline

#8 2008-12-03 10:44:02

fwalle
Member
Registered: 2008-08-01
Posts: 50

Re: Properties of a fields

You are very nice but I m using TIS 2.4.1 NOW  and we are not going to change now !!

So Is there a possibility to do that ???

I have some other problem with this f... component : tFileRowCount.... when i put an IF branch on it with a delete file the file is not DELETED

I want to check if files  is empty or not and if it is empty I delete IT ... easy no ?

In the if branch:
((Integer)globalMap.get("tFileRowCount_2_COUNT"))==0

The file EXIST and it is empty !!!

THE WORST:
I put the same condition with a tmessage box and The message box appear !!!


Other informaition I'm using contaxt variable to pass the path of the file and the name of the file :
context.Local_Descente + "/" +context.sFichierCourant + ".TXT"

But with a path like that:
"D:/Projets/Interfaces/Catalogue/Alice Client CI36/descente/ENTREC123.TXT"

The file is not deleted EITHER !!! sadsad


Is it a problem whith branch iterate ??? I don't know
any other solution ??

Thanks a lot !!!


Uploaded Images

Last edited by fwalle (2008-12-03 10:47:28)

Offline

#9 2008-12-03 11:41:19

fwalle
Member
Registered: 2008-08-01
Posts: 50

Re: Properties of a fields

I find a solution using GLOBAL VARIABLE !!! and the tfile properties pffff

Offline

#10 2008-12-03 11:51:22

plegall
Member
Registered: 2006-09-19
Posts: 1586
Website

Re: Properties of a fields

I've checked with TOS 2.4.1 (and it works the same with TOS concerning code generation), and it works.


Uploaded Images

Offline

#11 2008-12-03 14:50:06

fwalle
Member
Registered: 2008-08-01
Posts: 50

Re: Properties of a fields

SORRY but I am on TIS 2.4.1 r16077 and thr delete file doesn't  work .....

Offline

#12 2008-12-04 00:38:46

mhirt
Talend team
Registered: 2006-09-19
Posts: 1633

Re: Properties of a fields

So if we listen to you, despite plegall's very detailed job,  the

pffff

and

f....

tFileDelete and tFileRowCount and tFileList component are not working.

I really hope that you will discover the problem in your job, but, as far as I'm concerned, I will not even try to help you until you take the time to respect the rules of this forum, and particularly the rule #5....

Offline

#13 2008-12-04 09:51:39

fwalle
Member
Registered: 2008-08-01
Posts: 50

Re: Properties of a fields

Sorry for this but we are near the dead line of the project and lot of thing seem not to work ...

I just repeat I use exactly the same thing but on TIS not TOS ... so I don't think it is about my job... I try lot of times before disturbing you in the forum !!!

So never mind I find another solution ...

Offline

#14 2008-12-04 16:25:32

mhirt
Talend team
Registered: 2006-09-19
Posts: 1633

Re: Properties of a fields

OK.

When you will have a little more time. Come back to the forum. We will see together why it's not working with your job.

See you.

Offline

Board footer

Powered by FluxBB