Dataset Type
Dimension or Fact. Determines how Prequel Import detects changes.
Dataset Method
Table, SQL, or Glob. Determines how Prequel Import reads from the Source.
1. Dataset type
A Dataset’s type determines which columns Prequel Import uses to detect changes and whether it can sync incrementally. It applies the same way to every method. See Change Detection for how each type is synced.- Dimension
- Fact
Dimension tables contain rows that may be updated over time. These typically represent entities such as users, products, or accounts. Prequel Import tracks changes and syncs updates to existing records.Configuration fieldsSee the API reference for the full payload.
string
required
The column used to uniquely identify records. Must be a non-null string on every row. See Dataset requirements.
string
The column Prequel Import uses to find rows changed since the last sync. When set, every sync after the first reads only rows modified since the previous run. When unset, every sync reads the full Source. Records are merged by
primary_key_column either way. This setting also determines whether rows removed from the Source are detected. See Deletions.2. Dataset method
A Dataset’s method determines how Prequel Import reads data from the Source.- Table
- SQL
- Glob
Reads a named table from the Source, addressed by namespace and table name.Configuration fieldsSee the API reference for the full payload.
string
required
The namespace (for example schema or database) containing the source table.
string
required
The name of the table in the Source.
Dataset requirements
Every record Prequel Import reads from the Source must meet these requirements, whatever the Dataset’s type or method.- A primary key on every record. The column named by
primary_key_columnmust be present and non-null on every row the Dataset returns. - A string primary key. The
primary_key_columnmust be a string type in the Source, such astextorvarchar. Numeric and UUID columns need to be cast to a string, which the SQL method or a view in the Source can do. - Records under 32MB. The total size of each record must remain under 32MB to be processed.
Creating a dataset
A Dataset is created withPOST /import/datasets. Along with one type block and one method block from above, every Dataset specifies these common fields.
Configuration fields
See the API reference for the full payload.
string
A name for the Dataset.
string
required
How Prequel Import reads from the Source. One of
table, sql, glob.string
required
The type of Dataset. One of
dimension, fact.integer
required
How often (in minutes) Prequel Import checks this Dataset for changes. Must be at least 1.
boolean
Whether the Dataset is enabled. Defaults to
true when omitted.Updating a dataset
After a Dataset is created, only itsname, frequency_minutes, and is_enabled can be changed, with PATCH /import/datasets/{id}. The type, method, query, and column configuration are fixed when the Dataset is created. To change a query or column mapping, create a new Dataset.
Deletions
How deletions reach your Destination depends on the Dataset type.- Dimension. When
last_modified_columnis not set, every sync reads the full Source, and rows that no longer appear are delivered as deletions. Whenlast_modified_columnis set, syncs are incremental and rows removed from the Source are not detected. In that case, the Source must flag deleted rows in the column named byis_deleted_column. - Fact. Fact tables are append-only, so deletions are not propagated.
prequel__is_deleted: true along with its primary key, or exposes {{.IsDeleted}} when you use a body template. On the Record API, use the {{.IsDeleted}} template variable.