concatenate fields with out the the seperate singal in end or start.
- 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
as you can see ,I want to merge the green fields to blue ,while I do not want the red in start or end.
- Labels:
- Trifacta Classic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Wu,
Do you want / as the separator in the merge function?
Best,
Apeksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
yes ,I want /, for example
1) A is hello ,B is world .the result is expected hello/world
2) A is hello ,B is empty ,the result is expected hello
3) A is empty ,B is world ,the result is world.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Wu,
You can use the Replace feature and use `{delim}{end}|{start}{delim}` in the find section. If there is a possibility of different kinds of delimiters present in the data and you specifically want to remove the Merge Separator then use `/{end}|{start}/` in the find section as shown in the screenshot.
Hope this helps.
Best,
Apeksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thanks ,when I need to merge mulitple fields by sperate ;, and some fields are empty ,how can we get the result when the fields are empty I will do not merge them.
?
A:A01 B :empty C?C01 D :D01 result: A01;C01;D01
A:A01 B :empty C?empty D :D01 result: A01;D01
how can I get the result?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @wu cong?,
With help of the Replace transform, you can remove the empty fields after merge. 2nd approach is to use Unpivot and Pivot transforms to delete the column with no values. This 2nd approach might create performance issues depending on the number of columns and rows included in the data.
Please check the below link for detailed information on the approaches.
https://community.trifacta.com/s/question/0D53j000081h9kKCAQ/how-can-i-merge-serval-fields-by-some-signal-and-skip-the-empty-fields
Hope this helps.
Best,
Apeksha Prasad
