Macro to iterate through files in a directory
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have a series of Hierarchal XML files in a directory. When I try to process these files using the Directory and Dynamic Input tool, I am running out of memory - I have this as an open issue with Alteryx - this method is off the table for now.
As a workaround, I would like to iterate through each file in the directory, processing them one at a time.
I am a experienced developer, but new to Alteryx.
I would like to have a source workflow that creates a list of files. I then want it to read each file and pass a data stream to a macro file for processing. That macro will then pass back a result stream. The base function can then do final processiing on this.
Can anyone provide me some high level strategies for performing this? My first question is how to iterate through each file?
Thanks,
Marc.
Solved! Go to Solution.
- Labels:
- Batch Macro
- Developer Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, thank you for your example workflow and macro.
I used it as a model for my situation (a control table containing one row for each customer - including a filepath field and several other fields). I can successfully loop thru the companies and read each file using your technique. However, I also want to access other fields in the control table - say, company abbreviation, which I want to use in a formula to include in the output along with other info from each file. Not sure how. Thanks for any thoughts.

- « Previous
-
- 1
- 2
- Next »