Hi All,
Is there a way in Alteryx where in I could dynamically concatenate all columns from a data set? I’m thinking of using Multi-Field Formula, but I don’t know how I could apply it. I needed it to be dynamic so that it can accept different data structure from different data sets. If I could make it work, I'm thinking of using it inside a macro.
Solved! Go to Solution.
Hi @lhanson2 apologies, I only got the time now to respond. the solution of @flying008 is working. The configuration for the dynamic replace is posted on my previous comment. But I'll also attach here.
Another way is a RecordID, followed by a transpose (RecordID as Key Field), then summarise to concatenate, grouping on RecordID. If you want to create JSON for instance, you would need a formula to combine [Name]:[Value] etc before concatenating.
The Dynamic Replace will be much more memory efficient and so quicker runtime, but the transpose/Summarise will be easier to understand/implement
@flying008 I mirrored your work closely. I made one small modification; I added a Multi-Field tool to change all fields to strings. Thank you, that was very helpful.
Hi @flying008 ,
this is so helpful. do you mind to share the setup for Summarize Tool? Struggling with this, really appreciate
@Carrot_WinWin, you can see the config on the video on the first response or in the last comment workflow package. Attached and below is what it looks like:
Hi- Thanking everyone for this. This has been extremely helpful for me to concatenate columns dynamically. Having an issue with my concat_name field. It is truncating my data. I thought this would be an easy fix with a select tool before to force the name field to V_WString size 2147483647 and the Concat_Name Field in the Summarize tool still shows I have truncated fields. Any idea how to fix?
My data in excel for concatenating shows about 900 characters when I run a len on my concat
What is the data truncating to?
Is this a figure that resonates at all?
Is the result exactly the same after changing the length?
In short, truncated data should be easily found and resolved. Just got to look at where and why.
Note: Hopefully this "truncated data" thought is not referencing the results window message.