How do we separate the fields for the following .txt file?
As there are uneven spaces, how will alteryx read that this is one field?
whenever I pull the data into the canvas a pop up window will appear called "Resolve File type".
"Read it as a built in type " : from the drop down option choose Comma Separated Value (*.csv)
from here you can start using the text to columns tools to separate the data.
to get your output you can try what i did (just to see if it works)
1) text to columns tools :
(configuration:
column to split : Field_1
Delimiters: (space)
Split to columns
Number of columns: 3
Extra characters: Leave extra in the last column)
2) text to columns tools :
(configuration:
column to split : 3
Delimiters: (space)
Split to columns
Number of columns: 3
Extra characters: Leave extra in the last column)
3) text to columns tools :
(configuration:
column to split : 33
Delimiters: (space)
Split to columns
Number of columns: 3
Extra characters: Leave extra in the last column)
4) Select tool :
(configuration: uncheck/deselect fields "Field_1", "3", "33" (columns))
5) Formula tool :
just reuse/override column "33" (output column) with the following formula:
31]+" "+[32]+" "+[331]+" "+[332]
6) Data Cleansing tool :
select field : 333 only and "Leading and Trailing Whitespace".
7) Select tool :
configuration: uncheck/deselect fields "32", "331", "332"
8) text to columns tools :
(configuration:
column to split : 333
Delimiters: (space)
Split to columns
Number of columns: 3
Extra characters: Leave extra in the last column)
9) text to columns tools :
(configuration:
column to split : 3333
Delimiters: (space)
Split to columns
Number of columns: 3
Extra characters: Leave extra in the last column)
10) Select tool :
configuration: uncheck/deselect fields "333", "3332", "3333", "1_2"
11) Data Cleansing tool :
select field : ALL FIELDS and "Leading and Trailing Whitespace".
not sure if it will work from your end , but hopefully it does.
( i got the tip of reading it csv instead of txt from @mikemc1979 )
cheers!