Tue Oct 19, 2021 5:43 pm
Login Register Lost Password? Contact Us


Unable to spray tab-delimited file in 3.6.0 CE

Comments or questions specific to the features of ECL Watch

Fri Apr 13, 2012 1:28 pm Change Time Zone

Using the ECL Watch web interface I am unable to spray a tab-delimited file into my cluster. The spray happens, but if you look at the details of the sprayed file you'll see that a comma was used as the field separator rather than a tab. The resulting file is, of course, unusable. Spraying does work just fine with ECL standard library commands.

Is this a known issue with 3.6.0 CE that will be addressed? Or am I somehow doing something wrong?

Cheers,

Dan
DSC
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 568
Joined: Tue Oct 18, 2011 4:45 pm

Fri Apr 13, 2012 3:05 pm Change Time Zone

Dan,

I created a 3-record tab-delimited file, then uploaded and sprayed it to my VMware HPCC.

The Logical File Details page for the sprayed file shows the incorrect field separator -- it displays comma where I definitely sprayed with a \t.

However, the spray operation doesn't care about field delimiters, so the file itself is still good, and all I need to do is explicitly define the \t as the delimiter in my DATASET declaration and it works. Here's my code:
Code: Select all
r := record
  integer f1;
  integer f2;
  integer f3;
end;

ds := dataset('~TEST::RT::TabDelimit',r,CSV(SEPARATOR('\t')));

ds;
Which produces this result:
Code: Select all
1   2   3
4   5   6
7   8   9
HTH,

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1598
Joined: Wed Oct 26, 2011 7:40 pm

Fri Apr 13, 2012 3:12 pm Change Time Zone

OK, I understand the workaround. But what about code that relies on the documented behavior for the separator value?

Optional. The field delimiter. If omitted, the default is a comma (',') or the delimiter specified in the spray operation that put the file on disk.


This does seem like a bug.

Thanks for the workaround!

Dan
DSC
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 568
Joined: Tue Oct 18, 2011 4:45 pm

Fri Apr 13, 2012 6:18 pm Change Time Zone

Dan,
This does seem like a bug.
I agree. :)

I will report it.

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1598
Joined: Wed Oct 26, 2011 7:40 pm


Return to ECL Watch

Who is online

Users browsing this forum: No registered users and 1 guest