How many input files are in a script?
- 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
Hello Community,
I have a script with well over 100 input files and would like to know if there a way to know exactly how many are being used for the script. Is there some place to find this metadata about the script? Maybe something that tells you how many of each tool is being used in a script?
Thanks,
Shane
Solved! Go to Solution.
- Labels:
- Help
- Input
- Tips and Tricks
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @ShaneH ,
What script are you talking about? Why are you using a script?
Can you share with us your workflow with an example of what you're trying to do?
M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks M.!
Maybe "script" is the wrong term. I'm trying to count the number of input files that I have in a workflow without having to open all of the containers that I have them organized in.
Bonus question: Can you differentiate what you call a "script" vs a "workflow" I tend to use those terms interchangeably.
Thanks,
Shane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ShaneH ,
no problem. A script would be something like SQL, so we would literally be pulling out the filenames from the text. A workflow is built in Alteryx.
In order to answer your question we would need to see how you're loading the files in.
If you're loading them in using an input tool with a wildcard, then configure the input tool to pull in the filename:
Then put this field into a sum tool and use count distinct. This will tell you how many files there are.
Hope this helps,
M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ShaneH if you're wondering how many input data tools you have (rather than the number of files to which they connect), then you can search for all input data tools by pressing ctrl+f and then finding 'Input Data' in the tool name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I can see where that could be a handy setting to do in the beginning of a build for the purpose of counting the file names (or doing other things with them). However, this would require that I open every container and touch every Input Tool to change them since I'm months into the build.
I can look in Options/Advanced Options/Workflow Dependencies and see a list of all of the Inputs and Outputs, but I can't get a summary number that I know of. I know I could add them up myself, but I'm trying to find a systematic way of determining this.
Here is the layout (maybe the visual will help). I can't share the workflow because of privacy.
Within each container that connects to the Union, there are additional containers with all of the individual data streams (not sure if this is the proper term or not - feel free to school me here) for that month.
Thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@OllieClarke this is helpful. I can get the number this way. Not exactly what I was hoping for, but it works. 🙂 I thought there might be some sort of MetaData place where I could get this information about the workflow. Thanks for the idea!
