Skip to main content
Question

I have a pling delimited text file with the attribute names in the first row. How do I split the data AND put each attribute in a field whose name corresponds to the attribute name in the first row? A sample of the first five rows in below.


Forum|alt.badge.img

refid|type|latitude|longitude|source|add_dt|pressure_sys|situs_addr|situs_frac|situs_pre|situs_stree|situs_suff|situs_post|situs_suit|situs_buil|situs_juri|situs_zip|chg_dt

 

344122-1|SVCPT|32.7655812974478|-117.032253396029|GIS|1/25/2017|LM, LG, SV Gravity - 656|unset|unset|unset|unset|unset|unset|unset|unset|unset|unset|unset

 

302698-1|SVCPT|32.7659789784174|-117.023796522145|GIS|1/25/2017|LM, LG, SV Gravity - 656|unset|unset|unset|unset|unset|unset|unset|unset|unset|unset|unset

 

355862-1|SVCPT|32.7566364143178|-117.014639927890|GIS|1/25/2017|LM, LG, SV Gravity - 656|unset|unset|unset|unset|unset|unset|unset|unset|unset|unset|unset

 

302723-1|SVCPT|32.7641617522751|-117.023556288137|GIS|1/25/2017|LM, LG, SV Gravity - 656|unset|unset|unset|unset|unset|unset|unset|unset|unset|unset|unset

5 replies

bruceharold
Contributor
Forum|alt.badge.img+17
  • Contributor
  • January 26, 2017

A CSV reader with | delimiting character will do it.


Forum|alt.badge.img
  • Author
  • January 26, 2017
bruceharold wrote:

A CSV reader with | delimiting character will do it.

I can't do that because some of the fields have attributes with commas.

 

 


Forum|alt.badge.img
  • Author
  • January 26, 2017

Oops maybe I can @bruceharold. I think I tried that already but will try again.


Forum|alt.badge.img
  • Author
  • January 26, 2017

Thanks @bruceharold! Making the change in the Field Separation Parameter while adding the reader worked - versus what I'd tried earlier which was after the fact, using an attribute splitter with pling as the delimiter.


bruceharold
Contributor
Forum|alt.badge.img+17
  • Contributor
  • January 26, 2017
ieukcoca wrote:

Thanks @bruceharold! Making the change in the Field Separation Parameter while adding the reader worked - versus what I'd tried earlier which was after the fact, using an attribute splitter with pling as the delimiter.

I learned something too - I never heard a '|' being called a 'pling' before! :-)

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings