Sync data with Hightouch
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.
Create Sync in Hightouch
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.
Sync between BigQuery table and Google Sheets.
Trigger Sync via its API
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):
_10https://api.hightouch.com/api/v1/syncs/{syncId}/trigger
Store the API Token as a Secret in Y42
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.
Store the API Token as a Secret in Y42.
Create Python Action asset
- 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.
Specify an upstream dependency to act as the trigger for the Python asset.
Build asset
Build the asset using dag selectors or via the Build history
tab.
The +
selector, when used in front of the asset name in the command, also triggers all upstream dependencies.
Build history tab.
Verify Sync status in Hightouch
After returning to the Hightouch interface, the sync should be activated, having data to flowing to your configured destination. Congrats! 🎉
Sync successfully triggered.