Learn how to use the transformation scripts to push data directly to your API
This guide walks through how to leverage the transformation script to send data from a source directly to your API during a hotglue job. This should be used instead of a target. We will be using the Python requests library to do this.
We recommend using the Python transformation script to connect with your API for more flexibility. You can:
The script we will walk through is tested with the following requirements.txt
– if you have a different desired behavior, verify your dependency versions match.
For this example we will be working with Mailchimp list members test data. Download the CSV here to follow along.
Refer to the sample script below which:
list_members
CSV as pandas dataframe, andNow that the data has been mapped to our schema, we can create a payload and POST it to our API. If you’d like to learn more about the requests library syntax, visit their docs.
Refer to the sample script below:
Learn how to use the transformation scripts to push data directly to your API
This guide walks through how to leverage the transformation script to send data from a source directly to your API during a hotglue job. This should be used instead of a target. We will be using the Python requests library to do this.
We recommend using the Python transformation script to connect with your API for more flexibility. You can:
The script we will walk through is tested with the following requirements.txt
– if you have a different desired behavior, verify your dependency versions match.
For this example we will be working with Mailchimp list members test data. Download the CSV here to follow along.
Refer to the sample script below which:
list_members
CSV as pandas dataframe, andNow that the data has been mapped to our schema, we can create a payload and POST it to our API. If you’d like to learn more about the requests library syntax, visit their docs.
Refer to the sample script below: