JSData & Media Start a project

← All connectors

Schema · Entity relationship diagram

Prescient AI tables and relationships

Prescient AI marketing mix model results: modeled first-order and halo (second-order) revenue and conversions by channel, campaign, day and model, platform-reported spend by campaign and day, and your model and channel lists. Prescient restates recent days as its model learns, so recent days are refreshed on every sync.

Live4 tables · 4 relationships
ConnectPaste an API key
Default schemaprescient
Source API docsapi.prescient-ai.io
DestinationsAmazon Redshift, Google BigQuery, Snowflake, PostgreSQL, Amazon S3
  • Prescient restates about 30 recent days every day and sometimes rebuilds all history after a retrain; both are picked up automatically.
modeled_metrics.target → models.namemodeled_metrics.source_channel_name → channel_names.channel_namereported_metrics.channel_name → channel_names.channel_namemodeled_metrics.reported_date,source_channel_name,source_campaign_id joins reported_metrics.reported_date,channel_name,campaign_id (spend for the same campaign and day (ROAS / CAC denominator))models — Model {name, unit}: the models referenced by modeled_metrics.targetmodels3name VARCHAR(256) · primary keynamevarcharunit VARCHAR(64)unitvarchar_jsdata_synced TIMESTAMP_jsdata_syncedtimestampmodeled_metrics — ModeledMetricRow, one row per sales channel x day x campaign x model x metric. _jsdata_id = md5(sales_channel|reported_date|source_channel_name|source_campaign_id| target|metric_name|target_channel_namodeled_metrics12reported_date DATE · → reported_metrics.reported_date,channel_name,campaign_idreported_datedatesource_channel_name VARCHAR(128) · → channel_names.channel_name · → reported_metrics.reported_date,channel_name,campaign_idsource_channel_namevarcharsource_campaign_id VARCHAR(256) · → reported_metrics.reported_date,channel_name,campaign_idsource_campaign_idvarchartarget VARCHAR(256) · → models.nametargetvarchar_jsdata_id VARCHAR(32)_jsdata_idvarcharsales_channel VARCHAR(16)sales_channelvarcharsource_campaign_name VARCHAR(1024)source_campaign_namevarchartarget_channel_name VARCHAR(128)target_channel_namevarcharmetric_name VARCHAR(64)metric_namevarcharmetric_value DECIMAL(24,6)metric_valuedecimalprocess_date TIMESTAMPprocess_datetimestamp_jsdata_synced TIMESTAMP_jsdata_syncedtimestampchannel_names — channelNames: source channels in use on the accountchannel_names2channel_name VARCHAR(128) · primary keychannel_namevarchar_jsdata_synced TIMESTAMP_jsdata_syncedtimestampreported_metrics — ReportedMetricRow: platform-reported spend per campaign per day (the ROAS / CAC denominator). _jsdata_id = md5(reported_date|channel_name|campaign_id)reported_metrics8reported_date DATEreported_datedatechannel_name VARCHAR(128) · → channel_names.channel_namechannel_namevarcharcampaign_id VARCHAR(256)campaign_idvarchar_jsdata_id VARCHAR(32)_jsdata_idvarcharcampaign_name VARCHAR(1024)campaign_namevarcharspend DECIMAL(18,4)spenddecimalprocess_date TIMESTAMPprocess_datetimestamp_jsdata_synced TIMESTAMP_jsdata_syncedtimestamp
Primary keyForeign keyReferencesJoins on (not a key)

Drag to pan, scroll or pinch to zoom, click a table to see what it joins to.

Table reference

4 tables · click a table for its columns
modeled_metrics12 columns · Model outputshow in diagram

ModeledMetricRow, one row per sales channel x day x campaign x model x metric. _jsdata_id = md5(sales_channel|reported_date|source_channel_name|source_campaign_id| target|metric_name|target_channel_name) sales_channel is stamped by the connector (ECOMMERCE / RETAIL): the row type has no such field. target = model name (-> models.name). target_channel_name is set on SECOND_ORDER_* (halo) rows only and uses a different vocabulary from source_channel_name.

ColumnTypeKeyDescription
_jsdata_idRow id: md5 of the natural key.varchar(32)Row id: md5 of the natural key.
sales_channelECOMMERCE or RETAIL, stamped by jsdata (the API row has no such field).varchar(16)ECOMMERCE or RETAIL, stamped by jsdata (the API row has no such field).
reported_dateJoins to reported_metrics.reported_date,channel_name,campaign_id (spend for the same campaign and day (ROAS / CAC denominator)).dateFKJoins to reported_metrics.reported_date,channel_name,campaign_id (spend for the same campaign and day (ROAS / CAC denominator)).
source_channel_nameReferences channel_names.channel_name. Joins to reported_metrics.reported_date,channel_name,campaign_id (spend for the same campaign and day (ROAS / CAC denominator)).varchar(128)FKReferences channel_names.channel_name. Joins to reported_metrics.reported_date,channel_name,campaign_id (spend for the same campaign and day (ROAS / CAC denominator)).
source_campaign_idJoins to reported_metrics.reported_date,channel_name,campaign_id (spend for the same campaign and day (ROAS / CAC denominator)).varchar(256)FKJoins to reported_metrics.reported_date,channel_name,campaign_id (spend for the same campaign and day (ROAS / CAC denominator)).
source_campaign_namevarchar(1024)
targetReferences models.name.varchar(256)FKReferences models.name.
target_channel_nameSet on halo (SECOND_ORDER_*) rows only; a different vocabulary from source_channel_name.varchar(128)Set on halo (SECOND_ORDER_*) rows only; a different vocabulary from source_channel_name.
metric_namevarchar(64)
metric_valuedecimal(24,6)
process_datetimestamp
_jsdata_syncedWhen jsdata last wrote this row.timestampWhen jsdata last wrote this row.
models3 columns · Model outputshow in diagram

Model {name, unit}: the models referenced by modeled_metrics.target

Primary key: name

ColumnTypeKeyDescription
namePrimary key.varchar(256)PK Primary key.
unitvarchar(64)
_jsdata_syncedWhen jsdata last wrote this row.timestampWhen jsdata last wrote this row.
reported_metrics8 columns · Spendshow in diagram

ReportedMetricRow: platform-reported spend per campaign per day (the ROAS / CAC denominator). _jsdata_id = md5(reported_date|channel_name|campaign_id)

ColumnTypeKeyDescription
_jsdata_idRow id: md5 of the natural key.varchar(32)Row id: md5 of the natural key.
reported_datedate
channel_nameReferences channel_names.channel_name.varchar(128)FKReferences channel_names.channel_name.
campaign_idvarchar(256)
campaign_namevarchar(1024)
spenddecimal(18,4)
process_datetimestamp
_jsdata_syncedWhen jsdata last wrote this row.timestampWhen jsdata last wrote this row.
channel_names2 columns · Spendshow in diagram

channelNames: source channels in use on the account

Primary key: channel_name

ColumnTypeKeyDescription
channel_namePrimary key.varchar(128)PK Primary key.
_jsdata_syncedWhen jsdata last wrote this row.timestampWhen jsdata last wrote this row.

Connect Prescient AI All connectors