• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » 2.4.2 Error FileOutputDelimited path defined with context

#1 2008-09-09 16:32:53

msomso
Member
Registered: 1970-01-01
Posts: 93

2.4.2 Error FileOutputDelimited path defined with context

Hi
J use the context variables for define the path of my trace files.
It worked fine with TOS 2.3.2.
After migrating into 2.4.2r17347 J obtain the errors (screenshots):

http://www.imageshotel.org/thumbs/ms2008/20080909outfile2.jpg

http://www.imageshotel.org/thumbs/ms2008/20080909errmsg.jpg

The Java generated code is:

Code:

            String fileName_tFileOutputDelimited_2 = (new java.io.File(
                    context.REP_LOG + "JOURNAL_MIG.csv")).getAbsolutePath()
                    .replace("\\", "/");
            String fullName_tFileOutputDelimited_2 = null;
            String extension_tFileOutputDelimited_2 = null;
            String directory_tFileOutputDelimited_2 = null;
            if ((fileName_tFileOutputDelimited_2.indexOf("/") != -1)) {
                if (fileName_tFileOutputDelimited_2.lastIndexOf(".") < fileName_tFileOutputDelimited_2
                        .lastIndexOf("/")) {
                    fullName_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2;
                    extension_tFileOutputDelimited_2 = "";
                } else {
                    fullName_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2
                            .substring(0, fileName_tFileOutputDelimited_2
                                    .lastIndexOf("."));
                    extension_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2
                            .substring(fileName_tFileOutputDelimited_2
                                    .lastIndexOf("."));
                }
                directory_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2
                        .substring(0, fileName_tFileOutputDelimited_2
                                .lastIndexOf("/"));

It seems that "/t" works badly ...
Is it a known problem ? Some parameter/option has to be redefined ?

Best regards
msomso

P.S.
Where can J find a detailed documentation for the modified components (tSetGlobalVar: new Dynamic Setting, etc) ?

Last edited by msomso (2008-09-09 16:34:12)

Offline

#2 2008-09-09 17:41:38

jcoutin
Member
Registered: 2008-05-30
Posts: 170

Re: 2.4.2 Error FileOutputDelimited path defined with context

Hello,

In Context, replace "\" by "/" and it should be OK.

example : D:/_projets/CENTAUREE/MIG/trc_log/


José

Offline

#3 2008-09-10 08:52:55

msomso
Member
Registered: 1970-01-01
Posts: 93

Re: 2.4.2 Error FileOutputDelimited path defined with context

Hi,
You're right!
J didn't do it as the java code is supposed to do the same:

Code:

            String fileName_tFileOutputDelimited_2 = (new java.io.File(
                    context.REP_LOG + "JOURNAL_MIG.csv")).getAbsolutePath()
                    .replace("\\", "/");

J think it's a bug: "\\t" is recognized as "\t" = tabulation and no "\" followed by the "t" cacarcter, non ?

J compared the java generated code of TOS 2.3.2 / 2.4.2 and it seems be the same.


Best Regards
msomso

Offline

#4 2008-09-10 09:26:22

jcoutin
Member
Registered: 2008-05-30
Posts: 170

Re: 2.4.2 Error FileOutputDelimited path defined with context

Hello,

Yes, \t is recognized as tabulation,

Even if we can avoid the problem by using / instead of \, I think you should report a bug on the bugtracker.


José

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » 2.4.2 Error FileOutputDelimited path defined with context

Board footer

Powered by FluxBB