Tue Dec 07, 2021 6:38 am
Login Register Lost Password? Contact Us


Spray delimited

Comments and questions related to the Enterprise Control Language

Fri Nov 15, 2013 2:34 am Change Time Zone

I am uploading a delimited text file where each of the rows have some leading spaces and trailing spaces. When I try to spray the file and view the data file, the records are trimmed of leading and trailing spaces. Is there a flag to set to not trim the spaces?

Thanks
Srini
omnibuzz
 
Posts: 99
Joined: Wed Feb 06, 2013 2:02 pm

Fri Nov 15, 2013 7:02 am Change Time Zone

There are two parts to moving a file into the HPCC. The first part is "spraying". The second part is "interpreting the sprayed file as a dataset".

Most likely your original data was sprayed without being altered. However, the default settings for making a dataset from delimited data is to trim spaces.

Adding the "NOTRIM" option when you define your DATASET will probably do what you want.

e.g. ...

DATASET(myfile, mylayout, CSV(..., ..., NOTRIM));

Cheers,

Brian
BrianB644
 
Posts: 16
Joined: Thu Sep 13, 2012 7:52 pm

Fri Nov 15, 2013 12:39 pm Change Time Zone

Brilliant!! Thank you, Brian :)
Regards
Srini
omnibuzz
 
Posts: 99
Joined: Wed Feb 06, 2013 2:02 pm

Thu Mar 01, 2018 3:08 pm Change Time Zone

Thanks Brian
Gopala Rudraraju
 
Posts: 2
Joined: Fri Feb 20, 2015 2:44 am


Return to ECL

Who is online

Users browsing this forum: No registered users and 1 guest

cron