Create a new model
The input for creating a Model
The name of the model
The slug of the model
The type of the query. Available options: custom, raw_sql, tabel, dbt and visual.
The id of the source that model is connected to
If is_schema is true, the model is just used to build other models. Either as part of visual querying, or as the root of a visual query.
The primary key will be null if the query doesn't get directly synced (e.g. a relationship table for visual querying)
Visual query, used by audience
Custom query for sources that doesn't support sql. For example, Airtable.
Table-based query that fetches on a table instead of SQL
Standard raw SQL query
Ok
The SQL query that pulls data from your source to send to your destination. We send your SQL query directly to your source so any SQL that is valid for your source (including functions) is valid in Hightouch.