If I’m using AshEvents as resource called MyApp.Events.EventLog. It has a data field that is a map with a property called source_name.
From my resource, how can I string_join the property?
This will join the whole data field.
Instead of %{"source_name" => "api"},%{"source_name" => "api"}, I want api,api.
calculations do
calculate :source_names,
:string,
expr(
string_join(
list(
MyApp.Events.EventLog,
field: :data,
filter: expr(record_id == parent(id))
),
","
)
)
end






















