HTTP Request Enrichments
Last updated
Was this helpful?
Last updated
Was this helpful?
What are HTTP Request Enrichments?
HTTP Request Enrichments allow you to enrich your dataset using any HTTP service. This allows you to build enrichments using any service that Census may not natively support. Similar to AI columns and other enrichments, Census allows you to configure a HTTP request that is unique to each row in your dataset, and map the response back to a column. The enrichment is stored and materialized back in your warehouse.
For this example, we will use to enrich website event data with geographic information.
Login to Census and select a Dataset you want to enrich on the Datasets tab
On the top right corner, navigate to Enrich & Enhance > Enrichments > HTTP Request
Create a new HTTP Request Connection, or select an existing connection that you want to use
For MaxMind, we will use their GeoLite API: https://geolite.info/geoip/v2.1/country
Once you have your HTTP Request Connection selected, you can begin setting up your HTTP request
Name your enrichment
Choose an HTTP method, ex. GET
The request body should be a valid JSON object.
It is expected that the response from the endpoint is a JSON object.
Define each column of your enrichment by mapping the output names to keys in the returned JSON object. Each output name can be either a:
Top level key of the JSON object
Once you are done configuring your request and response, you can go ahead and create your HTTP Column!
Behind the scenes, Census will set up a table in your warehouse to store your enriched data. Census will also create a sync configuration that runs your enrichment and writes it into the created table.
Ensure that your dataset has a Unique ID Column. You can configure this by setting the on the Dataset
You will need to add an Authorization Header in the form Basic <
base64 encoding of
ACCOUNT_ID:LICENSE KEY>.
You can generate a new license key with MaxMind through their accounts portal: . See MaxMind's for more information.
Configure your endpoint. This could be a constant value, or use to encode record values in your endpoint. Note that theurl_encode
should be used to ensure that any special characters in your data will be parsed properly to be used in the URL
If your chosen HTTP method supports defining a request body (ex. POST
), you can also use to reference column values for each row.
A valid pointing to a nested value in the JSON object