Greetings Alteryx community!
Making my first post here, as I am facing a challenge I have not been able to solve.
I have about 100 log files in TXT format with the following schema:
I need to import the contents of all these txt files to get an overview of the logs and the errors thrown ("Status reason"). I have messed around with the standard Input tool and the Directory tool but have not found a way to import all the contents and organize it in columns. All the files have the same scheme although things are slightly more complicated since the number of tabs varies. For instance there is just a single tab after "Excel generate time" but 3 tabs added after "CVR".
Does anyone have an idea on how to achieve this, so I can import and organize the contents of all these log files in columns?
I am adding a couple of the log files for reference.
Thank you all
Solved! Go to Solution.
I have a workflow to share with you. Here's my approach:
Cheers,
Mark
How about the attached.
- Import the files as CSV with no separator (\0) and no headers
- Use a Regex tool to split into header and value:
(.*?):\t+(.*)
- Finally CrossTab to convert to columns
- And stealing from @MarqueeCrew idea, a MultiField tool to parse the dates
While faster/fewer tools, I thought that I would be explicit and use a simplified toolset. In your solution, you'll still create underlines instead of spaces in field names and the excel date field is in a different format from the other dates.
Cheers,
Mark
Date format looked the same to me (dd//mm/yy @ HH:MM:SS).
Agree on the underscores I always forget that and drives me batty on it :)
No objections to the simpler tools - personal preference. As always in Alteryx more than 1 way to do things!
Thanks a lot for both of the solutions, I will dive into them and learn from them both :)
@MarqueeCrew I just ran your flow and it gives the result I needed. I did get several field conversion errors that seem to be related to the date input and format (we use DD/MM/YY) and also the Danish ÆØÅ characters is causing a bit of trouble, so I will try to look into that.
Thanks again for your time and effort!
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |