When I apply the above changes using terraform it starts loading new sp-enrich-server but I can see following error in cloudwatch logs
{
"error": "ValidationError",
"dataReports": [
{
"message": "$.parameters.geo.database: does not have a value in the enumeration [GeoLite2-City.mmdb, GeoIP2-City.mmdb]",
"path": "$.parameters.geo.database",
"keyword": "enum",
"targets": [
"[GeoLite2-City.mmdb, GeoIP2-City.mmdb]"
]
}
]
}
All other events also stop because of above error and nothing is logged in database. As I revert the changes it starts working.
I have my bucket and GeoLite2-City.mmdb file.
Let me know what is that I am missing to enable the IP lookup enrichment?
In your custom_s3_hosted_assets_bucket_name you just need to provide the name of the bucket not an S3 URI so likely the IAM policy is not going to work as expected to resolve the files once you fix your Enrichment input.
Could you give that a try and see if it fixes it for you?
That has worked! Enrich server has launched without any error. I tried the same schema earlier but forgot to include bucket name. Thank you for highlighting configuration errors! Much appreciated.
How do I check whether IP enrichment is working or not? As I understand, I should see geo data in atomic.event table?
My application is built using react native. Do I need to use custom context over there?
Thanks you for the clarification. My application is using custom schemas. We have separate tables in postgresql that store data collected by tracker. These tables have columns corresponding to custom schema. Is it possible to have ip enrichment details like, geo_city, geo_country, geo_region, geo_zipcode,geo_latitude,geo_longitude, geo_regionname etc in my custom tables? We can modify our custom schema for the above fields if required.
You could do this with a custom enrichment (e.g., the Javascript enrichment) but the best way to do this would be to create a data model that contains this information downstream after Snowplow has inserted the data into Postgres.
As @mike said you are best of joining your custom events with the atomic.events table to get the geo information and modeling that information out into derived tables.
Okay. But I am not seeing geo location details for all events in atomic.events. Does this mean I have to make any change on my react native app code? Like invoking custom context or similar?
If the enrichment is enabled all new events should have the geo fields populated. You should not need to make any changes to your application or add custom contexts.