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

Alteryx designer Discussions

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

XML View tab Alteryx workflow - Extract

Meteor

Hi All,

 

Is there a way to extract full XML code from View tab code in Alteryx workflow into the xml or text file (I am after some sort of automated solution)? 

 

I know Alteryx yxmd file can be converted into xml by changing file extension but when reading from such file there are components missing in comparison to XML View tab.

 

Cheers,

Karol

Alteryx Certified Partner
Alteryx Certified Partner

Can you show an example of something that is missing? 

 

I would be under the impression that the XML view for each tool is simply a 'peak' into the full XML for the workflow as the 'yxmd' is simply telling alteryx where to put everything, what processes to run, and how everything is configured.

Ben

Meteor

I was under this impression also but when I read YXMD file as xml and want to retrieve selected columns from "select" tool it only show the ones I did not select (False) but when I go to the full html tab inside workflow there is entire chunk of code for selected columns.   

Meteor

this is code read from alteryx file converted to xml. Columns which has been selected are missing. I do not know why. I can only identify columns which has been deselected (in red). 

 

<Node ToolID="10">
<GuiSettings Plugin="AlteryxBasePluginsGui.AlteryxSelect.AlteryxSelect">
<Position x="618" y="102"/>
</GuiSettings>
<Properties>
<Configuration>
<OrderChanged value="False"/>
<CommaDecimal value="False"/>
<SelectFields>
<SelectField field="Column1" selected="False"/>
<SelectField field="Column2" selected="False"/>
<SelectField field="*Unknown" selected="True"/>
</SelectFields>
</Configuration>
<Annotation DisplayMode="0">
<Name/>
<DefaultAnnotationText/>
<Left value="False"/>
</Annotation>
</Properties>
<EngineSettings EngineDll="AlteryxBasePluginsEngine.dll" EngineDllEntryPoint="AlteryxSelect"/>
</Node>

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

I just tested this and it's not something I can replicate.

If I use a select tool the xml snippet will show the deselecteded fields in instances where the option 'unknown' is selected. However, if 'Unknown' is deselected then Alteryx will write the selected instances into the XML.

Alteryx Certified Partner
Alteryx Certified Partner

1.png2.png

Alteryx Certified Partner
Alteryx Certified Partner

If you want all columns to show in the XML then a simple hack would be to change one of the properties of all the selected fields, like adding a suffix which can be done to all fields in bulk using the 'options' in the top left.

Because you've made a change to the property of every field then they all appear in the XML.

 

Ben

Pulsar
Pulsar

If you want the same XML that you get from changing the .yxmd to .txt, then this can be accomplished with an Input tool but instead of reading in the yxmd as an XML file, choose csv, no delimiter, first row does NOT contain data, field length 999999999.

 

From there, you can use the XML and other parsing tools to get what you need.

Pulsar
Pulsar

Forgot to mention - the way I describe will create a row for every line of XML.  To get it all into one "cell" so to speak, use a formula tool to create a dummy filed (I call it "ForXtab") and set it equal to whatever label you want (maybe "XML").  Then use a Cross Tab tool - no grouping, header = the label field you just created in the formula tool, and the values being the concatenated "field 1" from the yxmd input.  For the delimiter use "\n" and set the size to 999999999. 

Meteor

Thank you Guys for your help. Let me go through these scenarios.

Labels