Data360 Analyze

Welcome to the Data360 Analyze community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements  Product Documentation  Ideas Portal

Discussions

Members

Resources

Events

 View Only
  • 1.  Text to Column

    Posted 02-01-2017 10:55

    I would like to separate a string of text into columns. The logic is that each column is separated by '&'. Is there a node that can do this for me quick?



  • 2.  RE: Text to Column

    Posted 02-01-2017 14:05

    Hi Khai,

    Yes, there is a node that can do this quickly.  It is called the"Delimited File" node.

    I created a file that contained one line that looked like this:

    Col 1&Col 2&Col 3&Col 4

    I ended the line with a carriage return.

    I dragged the Delimited file node to the canvas and filled in the following properties under Input:

    • File - I specified the file I created above
    • FieldDelimiter - &
    • RecordDelimiter - \n

    I then ran the node.  It produce 4 columns named Col 1, Col 2, Col 3, Col 4

    Let me know if that works.



  • 3.  RE: Text to Column

    Posted 02-01-2017 22:07

    Hi,

    If your data is already present on an output pin, then you could try processing it with a filter node.  In the filter, use this code:

    t=myField.split("&")

    emit t[0] as col1
    emit t[1] as col2
    emit t[2] as col3