Hi Team,
How to Convert XML generated in Alteryx of the workflow to Excel Format.
Can anyone can help.?
Solved! Go to Solution.
@rohit782192 perhaps you can share what you have for your workflow so far. It would be much easier to help if we could see what you've done so far and what the issue is that you're experiencing. Workflows can be attached the same way that you're attaching images.
You can consider any simple workflow by joininig two tables.
That will generate XML and you can pass..
Hi @rohit782192
Certainly it is harder to assist or help you when you share so little information about your issue, let's see if I GUESSED what you want, here we go.
I am writing these notes for member of the community that happen to visit this thread-topic. I am basing these notes on the following workflow, it volutered for this investiagation 😀
It is a simple workflow with 4 tools, and their tool's ID is shown above; Alteryx save the XML of these tools to the yxmd, organizing each one of them as nodes!
The Connection Tree
The attached workflow process the yxmd's XML for the file defined at the Input Data, the workflow is far from complete to process complex workflows with many tools, node at its very top-level is easier, detailing each node properties is way to complex.
Procesing the Connection in the workflow highlights how to retrieve this information, perhaps a macro with this concept could process complex workflows.
Attaching:
hth
Arnaldo
Not clear how you are taking a .txt file as XML and also how calling yxmd.
I have check your workflow only. if you open the workflow in can see in input data tool as .txt as input in one workflow and .yxmd file as input in another workflow.
I am confused how you have taken the input for the workflow.
You can consider these as a Simple Example.
<AlteryxDocument yxmdVer="2023.1" RunE2="T">
<Nodes>
<Node ToolID="8">
<GuiSettings Plugin="AlteryxGuiToolkit.ControlContainer.ControlContainer">
<Position x="88" y="53" width="498" height="317" />
</GuiSettings>
<Properties>
<Configuration>
<Caption>Test Example</Caption>
<Style TextColor="#314c4a" FillColor="#ecf2f2" BorderColor="#314c4a" Transparency="25" Margin="25" />
<Disabled value="False" />
<Folded value="False" />
</Configuration>
<Annotation DisplayMode="0">
<Name />
<AnnotationText>Test Example</AnnotationText>
<DefaultAnnotationText />
<Left value="False" />
</Annotation>
</Properties>
<ChildNodes>
<Node ToolID="2">
<GuiSettings Plugin="AlteryxBasePluginsGui.TextInput.TextInput">
<Position x="113" y="126" />
</GuiSettings>
<Properties>
<Configuration>
<NumRows value="4" />
<Fields>
<Field name="COUNTRYNAME" />
</Fields>
<Data>
<r>
<c>INDIA</c>
</r>
<r>
<c>LONDON</c>
</r>
<r>
<c>AMERICA</c>
</r>
<r>
<c>MUMBAI</c>
</r>
</Data>
</Configuration>
<Annotation DisplayMode="0">
<Name>Text Input 1</Name>
<DefaultAnnotationText>Text Input 1</DefaultAnnotationText>
<Left value="False" />
</Annotation>
<MetaInfo connection="Output">
<RecordInfo>
<Field name="COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
</RecordInfo>
</MetaInfo>
</Properties>
<EngineSettings EngineDll="AlteryxBasePluginsEngine.dll" EngineDllEntryPoint="AlteryxTextInput" />
</Node>
<Node ToolID="3">
<GuiSettings Plugin="AlteryxBasePluginsGui.TextInput.TextInput">
<Position x="114" y="246" />
</GuiSettings>
<Properties>
<Configuration>
<NumRows value="4" />
<Fields>
<Field name="COUNTRYNAME" />
</Fields>
<Data>
<r>
<c>INDIA</c>
</r>
<r>
<c>LONDON</c>
</r>
<r>
<c>AMERICA</c>
</r>
<r>
<c>DELHI</c>
</r>
</Data>
</Configuration>
<Annotation DisplayMode="0">
<Name>Text Input 2</Name>
<DefaultAnnotationText>Text Input 2</DefaultAnnotationText>
<Left value="False" />
</Annotation>
<MetaInfo connection="Output">
<RecordInfo>
<Field name="COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
</RecordInfo>
</MetaInfo>
</Properties>
<EngineSettings EngineDll="AlteryxBasePluginsEngine.dll" EngineDllEntryPoint="AlteryxTextInput" />
</Node>
<Node ToolID="4">
<GuiSettings Plugin="AlteryxBasePluginsGui.Join.Join">
<Position x="270" y="174" />
</GuiSettings>
<Properties>
<Configuration joinByRecordPos="False">
<JoinInfo connection="Left">
<Field field="COUNTRYNAME" />
</JoinInfo>
<JoinInfo connection="Right">
<Field field="COUNTRYNAME" />
</JoinInfo>
<SelectConfiguration>
<Configuration outputConnection="Join">
<OrderChanged value="False" />
<CommaDecimal value="False" />
<SelectFields>
<SelectField field="Right_COUNTRYNAME" selected="True" rename="Right_COUNTRYNAME" input="Right_" />
<SelectField field="*Unknown" selected="True" />
</SelectFields>
</Configuration>
</SelectConfiguration>
</Configuration>
<Annotation DisplayMode="0">
<Name>Join</Name>
<DefaultAnnotationText>Join</DefaultAnnotationText>
<Left value="False" />
</Annotation>
<MetaInfo connection="Left">
<RecordInfo>
<Field name="COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
</RecordInfo>
</MetaInfo>
<MetaInfo connection="Join">
<RecordInfo>
<Field name="COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
<Field name="Right_COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
</RecordInfo>
</MetaInfo>
<MetaInfo connection="Right">
<RecordInfo>
<Field name="COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
</RecordInfo>
</MetaInfo>
</Properties>
<EngineSettings EngineDll="AlteryxBasePluginsEngine.dll" EngineDllEntryPoint="AlteryxJoin" />
</Node>
<Node ToolID="5">
<GuiSettings Plugin="AlteryxBasePluginsGui.Union.Union">
<Position x="378" y="102" />
</GuiSettings>
<Properties>
<Configuration>
<ByName_ErrorMode>Warning</ByName_ErrorMode>
<ByName_OutputMode>All</ByName_OutputMode>
<Mode>ByName</Mode>
<SetOutputOrder value="False" />
</Configuration>
<Annotation DisplayMode="0">
<Name>Left Join</Name>
<DefaultAnnotationText>Left Join</DefaultAnnotationText>
<Left value="False" />
</Annotation>
<MetaInfo connection="Output">
<RecordInfo>
<Field name="COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
<Field name="Right_COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
</RecordInfo>
</MetaInfo>
</Properties>
<EngineSettings EngineDll="AlteryxBasePluginsEngine.dll" EngineDllEntryPoint="AlteryxUnion" />
</Node>
<Node ToolID="6">
<GuiSettings Plugin="AlteryxBasePluginsGui.Union.Union">
<Position x="390" y="270" />
</GuiSettings>
<Properties>
<Configuration>
<ByName_ErrorMode>Warning</ByName_ErrorMode>
<ByName_OutputMode>All</ByName_OutputMode>
<Mode>ByName</Mode>
<SetOutputOrder value="False" />
</Configuration>
<Annotation DisplayMode="0">
<Name>Right Join</Name>
<DefaultAnnotationText>Right Join</DefaultAnnotationText>
<Left value="False" />
</Annotation>
<MetaInfo connection="Output">
<RecordInfo>
<Field name="COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
<Field name="Right_COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
</RecordInfo>
</MetaInfo>
</Properties>
<EngineSettings EngineDll="AlteryxBasePluginsEngine.dll" EngineDllEntryPoint="AlteryxUnion" />
</Node>
<Node ToolID="7">
<GuiSettings Plugin="AlteryxBasePluginsGui.Union.Union">
<Position x="474" y="174" />
</GuiSettings>
<Properties>
<Configuration>
<ByName_ErrorMode>Warning</ByName_ErrorMode>
<ByName_OutputMode>All</ByName_OutputMode>
<Mode>ByName</Mode>
<SetOutputOrder value="False" />
</Configuration>
<Annotation DisplayMode="0">
<Name>Full Outer Join</Name>
<DefaultAnnotationText>Full Outer Join</DefaultAnnotationText>
<Left value="False" />
</Annotation>
<MetaInfo connection="Output">
<RecordInfo>
<Field name="COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
<Field name="Right_COUNTRYNAME" size="2147483647" source="TextInput:" type="V_String" />
</RecordInfo>
</MetaInfo>
</Properties>
<EngineSettings EngineDll="AlteryxBasePluginsEngine.dll" EngineDllEntryPoint="AlteryxUnion" />
</Node>
</ChildNodes>
<EngineSettings EngineDll="AlteryxBasePluginsEngine.dll" EngineDllEntryPoint="AlteryxCtrlContainer" />
</Node>
</Nodes>
<Connections>
<Connection>
<Origin ToolID="2" Connection="Output" />
<Destination ToolID="4" Connection="Left" />
</Connection>
<Connection>
<Origin ToolID="3" Connection="Output" />
<Destination ToolID="4" Connection="Right" />
</Connection>
<Connection name="#1">
<Origin ToolID="4" Connection="Left" />
<Destination ToolID="5" Connection="Input" />
</Connection>
<Connection name="#2">
<Origin ToolID="4" Connection="Join" />
<Destination ToolID="5" Connection="Input" />
</Connection>
<Connection name="#1">
<Origin ToolID="4" Connection="Right" />
<Destination ToolID="6" Connection="Input" />
</Connection>
<Connection name="#2">
<Origin ToolID="4" Connection="Join" />
<Destination ToolID="6" Connection="Input" />
</Connection>
<Connection name="#1">
<Origin ToolID="4" Connection="Left" />
<Destination ToolID="7" Connection="Input" />
</Connection>
<Connection name="#2">
<Origin ToolID="4" Connection="Join" />
<Destination ToolID="7" Connection="Input" />
</Connection>
<Connection name="#3">
<Origin ToolID="4" Connection="Right" />
<Destination ToolID="7" Connection="Input" />
</Connection>
</Connections>
<Properties>
<Memory default="True" />
<GlobalRecordLimit value="0" />
<TempFiles default="True" />
<Annotation on="True" includeToolName="False" />
<ConvErrorLimit value="10" />
<ConvErrorLimit_Stop value="False" />
<CancelOnError value="False" />
<DisableBrowse value="False" />
<EnablePerformanceProfiling value="True" />
<RunWithE2 value="True" />
<SortedGrouping value="True" />
<PredictiveToolsCodePage value="1252" />
<DisableAllOutput value="False" />
<ShowAllMacroMessages value="False" />
<ShowConnectionStatusIsOn value="True" />
<ShowConnectionStatusOnlyWhenRunning value="True" />
<ZoomLevel value="0" />
<LayoutType>Horizontal</LayoutType>
<MetaInfo>
<NameIsFileName value="True" />
<Name>JoinTestXML</Name>
<Description />
<RootToolName />
<ToolVersion />
<ToolInDb value="False" />
<CategoryName />
<SearchTags />
<Author />
<Company />
<Copyright />
<DescriptionLink actual="" displayed="" />
<Example>
<Description />
<File />
</Example>
<WorkflowId value="d3d4db0c-ee84-4750-a463-7bbc5bfb3408" />
<Telemetry>
<PreviousWorkflowId value="dc4d1cc9-cd4c-4685-a0b4-a7c4db2592e9" />
<OriginWorkflowId value="dc4d1cc9-cd4c-4685-a0b4-a7c4db2592e9" />
</Telemetry>
<PlatformWorkflowId value="" />
</MetaInfo>
<Events>
<Enabled value="True" />
</Events>
</Properties>
</AlteryxDocument>
The workflow shared with you read Alteryx yxmd files, e.g. workflow, you had not provide a clear description of the file type you are reading.
Your sample file's workflow is shown below:
None of the Alteryx's tools on its canvas are supported by the top half of my workflow, Alteryx has over 100 tools, I just coded logic for two or three of them, don't expect us to expend days coding all of them just for you 🤣
When ran using your workflow as data, the DbFileInput and Alteryx Select returned errors on empty data streams, once again, you should code the logic for the new tools.
Now this part processing the Connection tree should be expanded because your workflow includes more tools and obviously it has more connections between them, enhancing this module of the workflow is basically cut and paste. Note: This is not the most efficient way to handle this, a macro will do better, something you could do.
Arnaldo
I tried creating an Iterative macro by transposing it.
But the Workflow of Alteryx Sometimes does not give proper output.
Great share @ArnaldoSandoval ! I actually had a thought in my mind about this, but your method is way cooler/better. Will use it - thanks man!