Sync

Description

This job triggers a connector using this endpoint.

Use Cases

We recommend creating a Sync Task for every "sync" within Hightouch.

This way, you can use Orchestra to trigger your reverse ELT on a cron or event based schedule. This has a number of advantages vs. using Hightouch' sin-built scheduler:

  • You can co-ordinate tasks outside of Hightouch - these would typically be specific dbt job runs or operations that you know need to succeed before running an rELT sync

    • A common use-case is to have a dbt run job that tests the state of the data before triggering a sync in Hightouch. This way, you can ensure data pushed to underlying source systems such as Salesforce adheres to data quality constraints.

  • You can use Orchestra to trigger jobs across Hightouch Cloud Accounts

  • When Hightouch jobs run, Data Warehouse cost is incurred. Running these operations on a schedule you set explicitly ensures these costs do not go out of hand

  • We aggregate metadata from the Hightouch Task in the same place as the metadata from other operations in your Pipeline

Parameters

These parameters are required to run the Job run Task

NameData typeRestrictionsExample

Sync ID

Number

N.A.

1234567

Error handling

API Requests

If we receive the following error codes from Hightouch, we'll raise an error and the task will move to a failed state.

Code

Description

Handling

401

Unauthorised

We will raise an error and parse the raw error message from the Hightouch response as the Orchestra message

404

Not Found

We will raise an error with the HTTP Reason as the Orchestra message

Other error code

We will raise an error with the HTTP Reason as the Orchestra message

Failed syncs

Once an underlying sync completes, the sync response from Hightouch looks like this:

{
    "data": [
        {
            "id": 1234567,
            "createdAt": "2023-11-03T12:03:14.254Z",
            "startedAt": "2023-11-03T12:03:16.114Z",
            "finishedAt": "2023-11-03T12:04:15.187Z",
            "querySize": 2,
            "status": "success",
            "completionRatio": 1,
            "plannedRows": {
                "addedCount": 2,
                "changedCount": 0,
                "removedCount": 0
            },
            "successfulRows": {
                "addedCount": 0,
                "changedCount": 0,
                "removedCount": 0
            },
            "failedRows": {
                "addedCount": 0,
                "changedCount": 0,
                "removedCount": 0
            },
            "error": null
        }
    ],
    "hasMore": false
}

A Hightouch sync can consist of multiple jobs, as represented by dictionaries in the "data" array. Where any of these jobs fail i.e. the "status" field is not equal to "success", Orchestra will fail the Task.

Last updated