Solved
Read Audience conditionally and extract the name from filename.
Hi everyone,
How can I read an audience dynamically and only combine it with data read from a file if there is an existing audience? Otherwise, I would want to create a new audience from the file.
Two challenges:
- I would want to extract the Audience name from the file name via a regex. The regex should be as follows:
Something_[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}_(\w+)_[0-9]{8}_[0-9]{6}\.csv where $1 is the audience name. - If the audience already exists I would want to read that audience and combine it with the data read from a file. The file should be identified by that same regex.
If the Audience does not exist yet I would want to create a new one.
- How do I do a regex to extract the name from the file?
- How do I read the audience dynamically and union with the file data only if the audience exists?
Maybe I'm doing it all wrong but I want to pass an Audience from a Segment in Adobe Experience Platform.