String Replace in Calculated Field Charts

Hi,

I want to know if is possible to make string replace in calculated field.
I want to make field, with list of domains name by cleaning urls and only get domains list.

Thanks for your help !

image

Hi @Jonathan_Gautier,

Can you provide an example document and an example of what you expect? This would help me to reproduce and hack on my side.

As a short answer without more details, it sounds like you could solve this issue by applying an aggregation pipeline directly at the data source level and use $project and $substringBytes or another string manipulation to do what you want.

That being said, you can probably do the same with the Add Field feature you have here.

I have solve my problem, thanks for aggregation:

{ $regexFind: { input: “$order_status_url” , regex: “(?:https?:)?(?://)?(?:[^@\n]+@)?(?:www.)?([^:/\n]+)”} }

give me this in Charts

image

And just did

image

And finally got all my domain list in charts <3

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.