Skip to content

Amazon Redshift

JustAI doesn’t connect directly to your Redshift cluster. Use Hightouch to read your models and send one row per request to the Identify and Track APIs. You can also send the same requests from your backend.

If you need a file-based profile import, discuss your requirements with your JustAI team before building an export. They must confirm whether the import can be supported and provide its format, access requirements, update rules, and acceptance checks. See Plan an Amazon S3 file import.

Hightouch runs a SQL model against Redshift and sends one HTTP request per row. Build one model for profiles and one for events, then create an Identify sync and a Track sync.

Shape the data in SQL so that Hightouch sends valid values:

  • Cast user IDs and event IDs to text, with no leading or trailing spaces.
  • Format times as ISO 8601 text in UTC that ends in Z. JustAI rejects plain SQL timestamps such as 2026-10-12 06:00:00.
  • Exclude rows that are missing a user ID, an event name, or a time. Hightouch retries a rejected row on every run until you fix it.

This profile model uses the user ID as its primary key:

Profile model
SELECT
TRIM(user_id::varchar) AS user_id,
email,
first_name,
plan,
lifetime_value,
TO_CHAR(updated_at, 'YYYY-MM-DD') || 'T' || TO_CHAR(updated_at, 'HH24:MI:SS.MS') || 'Z' AS updated_at_iso
FROM analytics.customers
WHERE user_id IS NOT NULL

This event model uses the event ID as its primary key:

Event model
SELECT
TRIM(event_id::varchar) AS event_id,
TRIM(user_id::varchar) AS user_id,
event_name,
TO_CHAR(occurred_at, 'YYYY-MM-DD') || 'T' || TO_CHAR(occurred_at, 'HH24:MI:SS.MS') || 'Z' AS occurred_at_iso,
order_id,
order_value,
currency
FROM analytics.customer_events
WHERE user_id IS NOT NULL
AND event_name IS NOT NULL
AND occurred_at IS NOT NULL

Both examples expect TIMESTAMP columns that hold UTC times. For a TIMESTAMPTZ column, convert it first with CONVERT_TIMEZONE('UTC', occurred_at).

Create two HTTP Request syncs in Hightouch. The Hightouch guide has the destination settings and the JSON templates.

Sync Model Triggers Request
Identify Profile model, primary key user_id Rows added and Rows changed One row per request, POST /api/identify/{org_slug}
Track Event model, primary key event_id Rows added only One row per request, POST /api/track/{org_slug}

Hightouch lets you choose whether a sync’s first run sends the rows that already exist. Choose for each sync:

  • Identify sync. Send the existing rows, so that JustAI has every current profile.
  • Track sync. Skip the existing rows. A first run that sends every past event replays your history through the Track API, and a replayed event can start a published journey. Contact your JustAI team before planning an import of past events.

Redshift can export query results to Amazon S3 with UNLOAD. Exporting a file does not connect it to JustAI or confirm that JustAI can load it.

Before writing an export job, ask your JustAI team to confirm the supported format, column types, user ID mapping, destination environment, access requirements, delivery schedule, and verification steps. Test the agreed procedure with synthetic data before sending a full population.

Contact your JustAI team before planning an import of event history. Do not replay past events through Track: a matching event received after a journey is published can start, advance, or end that journey, regardless of its timestamp.

  1. In Hightouch, open the latest run of each sync. Identify rows show JustAI’s 200 response, and Track rows show 202.
  2. In JustAI, select Users and search for a test customer’s user ID. Compare their attributes with your profile model.
  3. Open Events > Custom events and check for the event from your test user. If an accepted event does not appear, contact your JustAI team with its messageId.

For a custom export, use the acceptance checks that your JustAI team confirmed. A successful UNLOAD alone does not confirm a load into JustAI.