Skip to main content

Overview

Hightouch provides an Airflow Operator for triggering syncs via Airflow. The Git repository contains the latest code as well as example DAGs to help you get started.

Setup

Create an API key

The first step is to create a Hightouch API key in your Hightouch workspace settings.
  1. From the API keys tab on the Settings page, click Add API key.
  2. Enter a descriptive Name for your key.
  3. Under User group, select the group whose permissions the key should have in this workspace, or select All of the creator’s groups to give the key the same permissions as you.
  4. Copy your API key and store it in a safe location. The key is only displayed once.
  5. Click Create API key.
Your API key provides read/write access to sensitive Hightouch resources and should be kept secure. If you believe your API key may have been compromised, revoke it immediately.

Add the Airflow connection

  1. In Airflow, create a new connection by going to Admin > Connections and clicking the + button to add a new connection.
  2. Enter hightouch_default as the Conn ID, select HTTP as the Conn Type, and set the host to https://api.hightouch.com. Optionally, enter a Description.
  3. Enter the API key you created in the Password field.
Adding a connection in the Airflow UI

Set sync schedule type

For the Airflow extension to trigger syncs via the Hightouch API, you must set the syncs’ schedules to Manual. You can do this by going to the Syncs overview page, selecting the particular sync you want to trigger with Airflow, and opening the Schedule tab. Here, make sure the Schedule type is set to Manual. You should do this for each sync you want to trigger with Airflow. Manual sync Hightouch UI You can also find the sync ID on this page, which you need for scheduling syncs in the next step. A sync ID in the Hightouch UI

Install the Airflow package

While the details will vary for your particular Airflow installation, the simplest way to install our package is through pip.

Add the HightouchTriggerSyncOperator to your DAG

The last step is to add the operator to a DAG and enter the sync ID of the sync you want to trigger. When the task is run, Airflow sends a call to the Hightouch API to trigger a run which completes asynchronously. Alternatively, you can choose to send a synchronous request and await the results of the sync before completing the task. For a full description of the operator parameters, view the source code in the GitHub repository.
Last modified on February 7, 2023