Loading Best Practices
These habits hold whichever way your data arrives — a file uploaded in the Model Editor, a script calling the Upload Endpoint, or the Keboola Writer. How to shape the data itself — people as internal ids, a star of events and things, empty cells for missing values — is in Preparing Your Data; this article is about getting it in.
The rules at a glance
| Do | Why |
|---|---|
| Describe the dataset before you load it | Columns are matched to properties by name |
| Write values Engeene reads | A value in the wrong form fails the load instead of being guessed |
| Give every row a stable ID | An incremental load updates a row by its ID |
| Write times with their zone, and set a primary time | A time with no zone is read as UTC; time ranges on the primary time answer fastest |
| Choose between adding and replacing | Each fits a different kind of source |
| Stage everything, then load once | Loads of one model never overlap |
| Load a database as a snapshot | Engeene never connects to your database |
Describe the dataset first
A file is loaded into the dataset it was uploaded for, and each column is matched to the property whose source column names it — or whose ID equals the column name where no source column is set. So describe the dataset in the Model Editor or the model definition before the first load, and keep column names consistent across every file of one dataset. Infer Schema from Example in the Model Editor proposes properties from a sample file — see Loading Data.
How values are read
An empty cell is the only empty value: a literal null or NULL in a Measure or Time column is an
error, not a blank. Infer Schema from Example proposes only types that load.
| Property type | Accepted values |
|---|---|
| ID, Attribute | Any text; an empty cell is the empty value |
| Reference | Text matching the referenced dataset's ID values; an empty cell links to nothing |
| Measure | Plain numbers — 1234, -5, 12.34. No thousands separators, no 1e5, no NaN. Extra decimal places are rounded half up (2.675 at two decimals is 2.68); a value too large to store fails the load rather than being stored as a different number |
| Time | Epoch milliseconds (1704153600000) or ISO 8601 — 2024-01-02, 2024-01-02T10:15:30, 2024-01-02 10:15:30.250, with Z or an offset (+02:00, +0200, +02). A value with no zone is read as UTC |
CSV files need a header row, comma delimiters and UTF-8 encoding. Parquet decimal, date and timestamp columns are read from the file's own schema. Each file may be at most 32 MiB — split a larger one, or compress it with gzip or zstd; the accepted files are listed in the Upload Endpoint.
Give every row a stable ID
Give each dataset an ID property — one value per record, such as an order number. An incremental load adds new rows and updates a row whose ID already exists, so a record sent twice is never counted twice. Use the key your own system already has, never a row number that changes from export to export.
A Reference links a row to another dataset by that dataset's ID, so load the referenced dataset too, with the same ID values. A reference to a record that does not exist shows as Unknown in every breakdown — a sign that one side of the link is missing.
Write times with their zone
- Write the zone —
2024-01-02T10:15:30+02:00or…Z. A time with no zone is read as UTC, so a local time without its offset lands hours away from where you meant it. - Set a primary time on every dataset of events — the time the event happened. Time-range queries on it answer fastest.
- Keep time at the granularity you need —
15 Minutesis recommended. The granularity of a Time property cannot be changed once data is loaded, so choose it before the first load (see Saving a model).
Add or replace
| Load | Use it when | What happens |
|---|---|---|
| Incremental (the default) | Your source produces new or changed records — today's orders, the last few days re-sent | New rows are added, rows whose ID already exists are updated |
| Replace | Your source produces the whole dataset each time — a full export of a table | Every dataset with newly staged files is replaced by those files; datasets without new files are untouched |
A replace is all-or-nothing: queries see either the old data or the new data, never an empty or half-loaded dataset. With incremental loads, re-sending the last few days is a safe way to pick up late corrections — that is how the built-in connections refresh numbers their source still revises.
An incremental load never removes a row. To remove records, replace the dataset; to empty a whole model, use Wipe All Data (Loading Data). An incremental update replaces the whole record, and a model that changes after its first load is covered in Changing a Model That Holds Data.
Stage everything, then load once
Loading is two steps: files are staged for their datasets, then one load imports every staged file of the model together, so the datasets of one model land side by side. Only one load of a model runs at a time — starting another while it runs is refused, so schedule jobs that load the same model so they do not overlap.
How often to load is up to your source: as often as it has something new, and no more. A load runs in the background and queries keep answering from the previous data until it completes. The built-in connections load once a day; a pipeline that loads hourly or daily is a good fit for most data.
Load a database as a snapshot
Engeene does not connect to your database. You load a database by exporting a query's result to files and uploading them like any other file, so your credentials stay on your machine and a slow database never slows a query down.
- Export — run one query per dataset and write the result to CSV or Parquet files.
- Stage — upload the files for their datasets.
- Load — start the load, usually as a replace for a full export.
Every export is a full snapshot; run it again to publish fresh data. Each dataset's properties describe the columns of the exported file, not the database schema.
See also
- Preparing Your Data — how to shape the data before it is loaded
- Upload Endpoint — loading from scripts and pipelines
- Loading Data — uploading a file in the Model Editor