Sync data with Hightouch
Learn how you can trigger Hightouch Syncs with Python actions.
Hightouch makes it easy to collect, prepare, and sync your data into any ad platform, CRM, email tool and more. No engineering, manual work, or costly traditional CDP required.
With Python Actions, Y42 enables programmatic triggering of Hightouch syncs via its API.
Syncs establish connections between your Data Warehouse sources and Destination Services. For detailed information, refer to the Hightouch documentation (opens in a new tab).
Add a new sync or use an existing one. Choose as source for the Sync, one of the tables published by Y42 in your data warehouse.
You can trigger each sync programmatically through its API. The sync configuration page provides the trigger API endpoint.
To initiate the sync, use the following POST request format, as documented here (opens in a new tab):
To trigger a sync programmatically in Hightouch, you must authenticate your request using headers that include a bearer token. This token is obtained from your Hightouch API keys.
Steps to create an API Token in Hightouch:
- Navigate to Settings in the Hightouch UI.
- Select API keys.
- Click on Add API key to generate a new token. For more detailed instructions on generating and managing API keys, refer to the Hightouch documentation here (opens in a new tab).
You can securely store API tokens (or any other secrets) within Y42 using the Secrets menu.
- Create the Python Action asset: Use the POST request method outlined earlier and reference the API Token from the Secrets vault.
- Specify an upstream dependency (Optional, but recommended): In the Dependencies tab, you can specify an upstream dependency for the Python asset. This dependency acts as a trigger, activating the Python Action to synchronize data with a third-party application upon the successful completion of the upstream asset.
It's often practical to select the source table, which was utilized to establish the Sync, as the dependency.
Build the asset using dag selectors or via the
Build history tab.
+ selector, when used in front of the asset name in the command, also triggers all upstream dependencies.
After returning to the Hightouch interface, the sync should be activated, having data to flowing to your configured destination. Congrats! 🎉