Hi Alteryx Community!
I am getting a database (csv format) where all information is stored on 4 columns:
Tag# | Time-Stamp | Value | Data Quality |
Tag#1 | 09:00 | 10 | OK |
Tag#1 | 10:00 | 11 | OK |
Tag#1 | 11:00 | 10,5 | OK |
Tag#1 | 12:00 | 0 | NOK |
… |
|
|
|
Tag#2 | 09:00 | 9 | OK |
Tag#2 | 10:00 | 9,5 | OK |
Tag#2 | 11:00 | 0 | NOK |
Tag#2 | 12:00 | 9,1 | OK |
… |
|
|
|
Tag#3 | 09:00 | 100 | OK |
Tag#3 | 10:00 | 105 | OK |
Tag#3 | 11:00 | 102 | OK |
Tag#3 | 12:00 | 103 | OK |
.. |
|
|
|
I would like to break the file so that I can get:
Time-Stamp | Tag#1_Value | Tag#1_Data_Quality | Tag#2_Value | Tag#2_Data_Quality | … | … |
09:00 | 10 | OK | 9 | OK | 100 | OK |
10:00 | 11 | OK | 9,5 | OK | 105 | OK |
11:00 | 10,5 | OK | 0 | NOK | 102 | OK |
12:00 | 0 | NOK | 9,1 | OK | 103 | OK |
I have more than 500 tags listed in the 1st column of the original file and approx. individual 3000 values for each of them so automating the whole process would be nice ^^
I have designed a simple workflow which is giving me:
Time-Stamp | Tag#1_Value | Tag#2_Value | Tag#3_Value | Tag#1_Data_Quality | Tag#2_Data_Quality | … |
09:00 | 10 | 9 | 100 | OK | OK | OK |
10:00 | 11 | 9,5 | 105 | OK | OK | OK |
11:00 | 10,5 | 0 | 102 | OK | NOK | OK |
12:00 | 0 | 9,1 | 103 | NOK | OK | OK |
But…
1) I believe there might be a simplest way to do it?
2) I need to have Tag#_Value and Tag#_Data_Quality close from eachother for a later process
I am attaching the sample workflow, maybe some of you will have an idea :-)
Thanks,
Pierre-Loui
Solved! Go to Solution.
Here's a simple workflow that should achieve the desired end result:
I left out the Select tool where you are converting the numbers to Doubles since it was generating an error in my system, presumably because my localisation expects decimal numbers to have a dot rather than a comma.
Hope this helps!
-----
If I've solved your problem please consider marking this solution as accepted. Thank you!
Hi @jamielaird,
Thanks a lot for taking the time to design this workflow :-)
It works perfectly and I have combined it with another function I have discovered while reading the forum: I have learnt that you can use one data entry and put "C:\...\*.csv" linked with a union tool and it reads all the csv files in the folder and union them!
Alteryx is currently sweating a bit proceeding all of this (>30.000.000 records) but so far so good :-)