Hi everyone,
I'm currently working on a tricky subject. You could maybe bring me new visions on how to achieve it.
Context:
Several input files are received from different sources. The inputs are different (number of field, field positions and field names). What I am trying to do is to find a way to use those files to build a final one that will contain all the possible fields.
Question:
Is there a way thanks to the interface tools to ask users to match the field names they have in their inputs file with the name of a data dictionary and then update their file with the rights names (the ones of the dictionary)?
Any idea is welcome.
Please feel free to ask for more details if not enough clear.
Thanks in advance for your help.
Melanie
Solved! Go to Solution.
Edit: I misread your post the first time, but I think I've got it now.
I've built an example macro that shows how I would go about doing this for 4 fields (Field1,Field2,Field3,Field4). It's a macro that will act as your input tool that forces the user to specify the file, and assign each of the four fields. Then only the four fields are output, named as the common assignment..
Check out the attached example and let me know if you have any questions.
Hi @MelanieR ,
I was not sure if the input files have keys to join other files so I tried both union and join .
The wf attached has sample input files plus the data dictionary names . Dynamic rename changes names to standard names .
The last step is union or join .
Hope this helps .
Hi @CharlieS ,
Thank you for your answer, it seems very interesting but i'm encountering an issue when testing. Indeed, I don't know if it's because I'm using csv file as input, but the list box proposes only one item containing all the field names, then I can not select the desired name:
How could I solve this? Sorry it might be easy to solve but I'm quite new using Alteryx.
Hi @benakesh,
Thanks a lot for your answer but it can not solve my issue as the input fields can have different positions. Then they will not necessarely match with the order of data dictionary fields.
Anyway thanks again for your quick reply!
The .csv file I tested didn't do that. Could you post a sample .csv file like the one you're trying to use?
Hi @CharlieS,
I found the issue regarding the csv file. The separator used was un semi-column. With a coma it works perfectly!
Thanks a lot for your solution, it helps a lot!!
Melanie
Hi Charlie
good to chat with you. this Macro has been helpful to me and thank you so much. i'm using it to read .rc files however i have been having issues with my weekend files . they seem to have a different structure even though they have all the columns i need . when i run the workflow i get the columns attached and all the other files are working fine.. could you help on this