community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Parsing Financial Information Exchange (FIX) files

Highlighted
Atom

Hi 

 

I am trying to parse a FIX file, which I understand  is a type of XML file in that each field within a record has its own header. So in the example below (which I have put into columns), the numbers in black (34, 52, etc) are field headers and those in blue are the actual data. 

 

My problem is that a simple text to column parse as per below will not work as the nil value fields are not recorded and hence the records are multi length (see field headed '6' below as an example).

 

To parse this I guess I can spend some time writing lengthy IF-THEN statements, but I am just wondering if there is a quick way to parse this using a standard AlteryX tool(s)? I had a go with the XML parser, but did not get far. There are over 300 or so headers so I am hoping I can create the column names dynamically. 

 

If anyone has an existing workflow or any tips, I would hugely appreciate...Newbie to AlteryX, so apologies if I am missing something obvious...

 

Many thanks!

 

34=19852=20181106-08:01:2550=XXX57=SEIDNI2128=SEIDNI6=37.3311=005820181105-DNI14=29
34=19952=20181106-08:01:2950=YYY57=SEIIWA3A128=SEIIWA31=569_C11_TPAB6=40.38111=000420181105-IWA3
Pulsar

Could you post an example of the raw data?

Atom

Hi David

 

Here we go

 

The raw file is in three columns, with the XML data in column 3, separated with pipes instead of '<' and '>', so I am thinking of a way to replace the pipes to turn this into a more standard XML format?

 


@DavidP wrote:

Could you post an example of the raw data?




 

2018-11-0608:00:23.289_3968=FIX.4.2|9=332|35=8|49=XXX|56=SYS1|34=190|52=20181106-08:00:23|128=802c88|1=802c88_ISA|6=1.2557|11=7314956|14=12|15=GBP|17=EAVVA18KA1117184|20=0|22=4|30=XLON|31=1.2557|32=12|37=OAVVA18KA8302522|38=12|39=2|40=1|48=JE00B6173J15|54=2|55=GCP|59=1|60=20181106-08:00:21|63=6|64=20181108|76=CSTEGB21|110=0|119=15.0684|120=GBP|150=2|151=0|167=CS|207=XLON|10=105|
2018-11-0608:00:33.579_0848=FIX.4.2|9=393|35=8|49=XXX|56=SYS1|34=191|52=20181106-08:00:33|128=802c11|1=569_C11_TPAB|6=0.2366|11=16669868|14=6061|15=GBP|17=EBSTI18KA1117185|20=0|21=2|22=4|30=XOFF|31=0.2366|32=6061|37=OBSTI18KA8302657|38=6061|39=2|40=2|44=0.2366|48=GB00B0DG3H29|54=1|55=SXX|59=6|60=20181106-08:00:31|63=3|64=20181108|76=WNTSGB2LBIC|110=0|119=1434.03|120=GBP|126=20181106-23:00:00|150=2|151=0|152=1434.03|167=CS|207=XLON|10=178|
Nebula

hi @Amohazab 

 

Once you get the data into the format that you displayed, the attached workflow

1. Transposes

2. Splits the value into Key and data

3. Crosstabs to align all the data under the correct key.  The Crosstab accounts for the missing key/data pairs in the records displaying those as empty.

 

Result.png

 

 

Dan

Pulsar

@danilang bet me to it.

 

fix parse.png

Nebula

 

 

High praise indeed from @DavidP.  You have to get up early to beat him.  Here's an update to mine that starts with your raw dataResult2.png 

 

 

 

Dan

Atom

Hi Dani and David

 

Praise indeed -  worked pretty much out of the box, thank you!

Labels