Prescient AI
Use the Prescient AI connector to sync marketing mix modeling (MMM) output — including halo effects — and platform-reported spend into your Athena lakehouse. This is a Blotout custom connector built on the Airbyte Connector Builder (declarative manifest).
Prerequisites
Section titled “Prerequisites”- A tag with Blotout Cloud set up (green checkmark in the Tags table)
- Prescient AI API access enabled on the account (requires CSM request)
- An API token generated by an org admin under Settings → API — displayed once; if lost, generate a new one
- Be aware: tokens can be channel-scoped — a scoped token returns a subset of channels with no error
Create the pipeline
Section titled “Create the pipeline”Follow the shared Create a pipeline steps until the source catalogue appears, then select Prescient AI.
Source configuration
Section titled “Source configuration”On the Source step, configure the connector:
| Field | Purpose |
|---|---|
| Schedule Type | How the pipeline runs — typically Scheduled |
| Sync Frequency | How often Airbyte syncs (for example, Every 24 hours) |
| Source Name | Name for this pipeline — used in the Athena schema <SOURCE_NAME>_<ENV> |
Authentication
Section titled “Authentication”Every request carries Authorization: apikey <token>. Note: the scheme word is apikey, not Bearer.
Configuration fields
Section titled “Configuration fields”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| api_key | secret string | Yes | — | Prescient AI API token. Sent as Authorization: apikey <token>. |
| start_date | string | Yes | — | Earliest marketing day to pull (YYYY-MM-DD). This is the full history window — set it to the start of the client’s Prescient history. Not the incremental cursor. |
| end_date | string | No | Today | Leave blank for scheduled connections. |
| lookback_days | integer | No | 7 | Rewinds the processDate cursor only — guards against restatements landing mid-sync. Does NOT control how far back marketing days are read. |
| sales_channel | array | No | Both | ECOMMERCE / RETAIL filter for modeled_metrics. Empty = both. |
| base_url | string | No | https://api.prescient-ai.io | The connector appends /graphql. |
Supported sync modes
Section titled “Supported sync modes”- Incremental Sync — Append (
modeled_metrics,reported_metrics) - Full Refresh (
models,channel_names)
Supported streams
Section titled “Supported streams”| Stream | Cursor | PK | Sync Mode |
|---|---|---|---|
modeled_metrics | processDate | reportedDate, sourceChannelName, sourceCampaignId, metricName, target, targetChannelName | Incremental |
reported_metrics | processDate | reportedDate, channelName, campaignId | Incremental |
models | — | name | Full Refresh |
channel_names | — | id (constant) | Full Refresh |
modeled_metrics — the MMM output
Section titled “modeled_metrics — the MMM output”Modeled attribution per campaign per day, including halo effects. Rows are long/EAV — one row per metric, so a single campaign-day produces many rows.
metricName is one of eight values:
| REVENUE | CONVERSIONS | LEADS | SUBSCRIPTIONS | |
|---|---|---|---|---|
| FIRST_ORDER_ | Direct, last-click-style credit | |||
| SECOND_ORDER_ | Halo credit on another channel |
sourceChannelName = what was spent on. targetChannelName = what got the credit (populated on SECOND_ORDER rows only; null for FIRST_ORDER).
metricValue has no intrinsic unit — join target → models.name → models.unit to determine if it’s revenue, customers, or subscriptions. Never sum across models without checking the unit.
reported_metrics — platform-reported spend
Section titled “reported_metrics — platform-reported spend”What the ad platforms said was spent, before Prescient models anything. Join to modeled_metrics on campaign + date to get modeled return against actual spend.
models
Section titled “models”One row per model: name and unit. Joins to modeled_metrics.target. Also the check stream.
channel_names
Section titled “channel_names”A single row listing the channels this token can see. Use it to verify token scope — a scoped token returns a subset with no error.
Downstream notes
Section titled “Downstream notes”- Schema:
prescient_ai_<client>_prod.* - Deduplication (both metric streams are Append; restatements arrive with different values):
SELECT * FROM ( SELECT *, ROW_NUMBER() OVER ( PARTITION BY reportedDate, channelName, campaignId ORDER BY _airbyte_extracted_at DESC ) AS rn FROM prescient_ai_<client>_prod.reported_metrics) WHERE rn = 1- To pivot modeled_metrics from long to wide:
SELECT reportedDate, sourceChannelName, sourceCampaignId, target, SUM(CASE WHEN metricName = 'FIRST_ORDER_REVENUE' THEN metricValue END) AS first_order_revenue, SUM(CASE WHEN metricName = 'SECOND_ORDER_REVENUE' THEN metricValue END) AS halo_revenueFROM modeled_metrics_dedupedGROUP BY 1, 2, 3, 4Changelog
Section titled “Changelog”| Version | Date | Description |
|---|---|---|
| 1.0.0 | 2026-09 | Initial release with 4 streams: modeled_metrics, reported_metrics, models, channel_names |
Complete Schema and Summary
Section titled “Complete Schema and Summary”Continue through the Schema and Summary steps to choose streams and confirm the connection. Save and run the first sync.
After a successful sync, Airflow creates an organization-scoped DAG for the pipeline, and dbt models feed downstream analytics.
Related documentation
Section titled “Related documentation”- Data Pipelines overview — Tags-first create flow