Hello! I’m new to working with both Snowplow and APIs, and I just had a few questions regarding the set-up for API request enrichments.
My goal is to enrich each event being sent from an app with the app metadata. I currently have a REST API on AWS API Gateway that takes GET requests and returns a JSON object literal that looks like the following:
{"Item":{"json":"{ \"endpoint\": \"external\", \"team\": \"my_team\" }","app_name":"my_app"}}
This data exists in a DynamoDB table where the key is the app_name
. My goal is that, when any event (custom structured events, page views, page pings, etc.) is being fired from a specific app (e.g. my_app
), I could call the API with the app name as the key, and this information could be appended onto that event. I’ve looked through the tutorial here and have read through some forum posts on this site for reference, but I am having trouble understanding how to set up the configurations:
In editing the api_request_enrichment_config.json
file in Phase 3, I had the following questions:
- When would I use
pojo
vsjson
? Is this different depending on the event I’d want to be enriching (e.g. page view vs custom structured events)? - If I do use
json
, what is meant to go infield
andschemaCriterion
? Particularly for events like page views that don’t seem to follow a specific schema? - For
outputs
, does the outputted information get automatically appended to the Snowplow event being tracked? It seemed like in the tutorial that the returned data from the API was stored in a separate table in clearbit, but I was wondering if there was any way to attach that data to the payload of a page view/custom structured event? Is this something configured in theapi_request_enrichment_config.json
file? Or would it be an additional parameter when I calltrackStructEvent
?
Thanks so much in advance! I’m a little new to all of this, so I’m happy to clarify anything that didn’t make sense.