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.
Redshift through Hightouch
Section titled “Redshift through Hightouch”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.
Before you begin
Section titled “Before you begin”- A Hightouch workspace with Redshift connected as a source.
- A JustAI API key and your organization slug. See Credentials.
- To send to more than one JustAI environment, a separate destination and syncs for each one. See Send to production and a staging environment.
Build the models
Section titled “Build the models”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 as2026-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:
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_isoFROM analytics.customersWHERE user_id IS NOT NULLThis event model uses the event ID as its primary key:
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, currencyFROM analytics.customer_eventsWHERE user_id IS NOT NULL AND event_name IS NOT NULL AND occurred_at IS NOT NULLBoth examples expect TIMESTAMP columns that hold UTC times. For a TIMESTAMPTZ column, convert it first with CONVERT_TIMEZONE('UTC', occurred_at).
Create the syncs
Section titled “Create the syncs”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.
Plan a custom export
Section titled “Plan a custom export”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.
Check your work
Section titled “Check your work”- In Hightouch, open the latest run of each sync. Identify rows show JustAI’s
200response, and Track rows show202. - In JustAI, select Users and search for a test customer’s user ID. Compare their attributes with your profile model.
- 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.
