Hey!
I have a given CSV file.
How it is possible to iterarte over the csv-file (as a build macro, I think)
like:
for each row
parse the row content
do something with...
add result for this row to an other csv file
next row
...
I mean get for each row a single result at first and add the single result the other csv file.
My Example:
I have a result set in my csv file. Each content of the row is a XML syntax. )But the count of rows can be different).
When I parse the row to a specific child name I get four result child values (in my example) for specific child name for each row.
But I need only the first result child value.
And I kept on working on the first result value only.
The problem is the different count of my Input-Data file.
So I can never say the real count of rows.
Is there a solution to create a macro in Alteryx?
If the solution transferable to a database table.
Mathias
Solved! Go to Solution.
Hey Chris!
In my example I get after xml-parsing algorithmus 12 rows as result in my Browse-Tool. By given 3 rows to parse in the CSV-File.
I have a Record-ID Tool between the XML-Parse-tool and the Browse-Tool.
I need the row with the record-id 1, 5, 9 for a right solution.
By given 4 rows in the CSV-File. I get 16 rows after the xml-parsing algorithmus.
I need the row with the record-id 1, 5, 9, 13 for a right solution.
and so on ...
example resultset
I don' t understood must can I use the Sample-Tool?
Mathias
Hi Mathias,
Try putting the Record ID tool in front of your XML parse. That will then give you the orginial RecordId for each record after the XML parse. Then you just want the first row for each RecordId. So after the XML parse add a sample tool, set to "First N Records"; "N = " to 1 and Grouping Fields select your RecordId field.
Hey Adam hey Chris,
thank you for your support.
I get the results where I am looking for.
Mathias