Skip to main content
Once the manifest is in place, every upload runs through a fixed sequence of validations, then applies the merge logic governed by three flags. This page documents both — what causes an upload to fail, and what happens to each row when it succeeds.

Validation rules

The processor runs these checks in order. The first failure aborts the upload and records the error message in the process’s statusDescription.

1. Date column must exist and parse

If the manifest declares a date column, the CSV must contain it. Every value must parse against the dataset’s configured date format. Alphacast tries the configured format, then a lowercased variant, then splits on whitespace and retries — so 2024-01-01 00:00:00 parses fine against %Y-%m-%d.

2. All entity columns must exist

Every column with isEntity: true in the manifest must appear in the CSV header.

3. The CSV must not be empty

A header-only CSV with zero data rows counts as empty.

4. Entity columns must not contain null values

After Alphacast strips whitespace from entity values, every entity column must have a value on every row. Empty cells are first replaced by the literal string 'none', but if a value is genuinely missing — for example, NaN propagated from a prior calculation — the upload fails.

5. New columns require explicit opt-in

If the CSV contains columns the dataset has never seen before and the dataset already has a manifest from a prior upload and you did not pass acceptNewColumns=true, the upload fails. To add columns intentionally, pass acceptNewColumns=true. To rename a column instead, use the manifest’s destinationName field — see Manifest.

6. Column names must be unique (case-insensitive)

After Alphacast normalizes column names (lowercases, removes whitespace, strips accents), no two columns may collide. Watch out for gdp vs GDP, or País vs Pais — both pairs collide.

7. No duplicate rows by entity key

Two rows with the same combination of entity-column values (including the date column) are treated as duplicates. The upload fails and reports the count plus the first ten offending key combinations. If your data legitimately has multiple measurements per Date + Country, you need an additional entity column (e.g. Sector or Source) to disambiguate them.

8. Short Integer values must fit Int16

Columns marked Short Integer in the manifest must hold values in the [-32768, 32767] range. Decimals, NaNs after coercion, or out-of-range integers all fail. For values larger than 32,767, use Decimal instead.

9. Decimal columns need ≥80% numeric content

Columns declared Decimal go through automatic numeric inference (handles 1,200.50, 1.200,50, 12.5%). If fewer than 80% of non-null values parse as numeric, Alphacast silently downgrades the column to String. There is no error in this case, but the column won’t behave as a measurement — inspect the column types after the first upload to catch this.

Upload modes

Once validation passes, the processor merges the new rows with the existing dataset. Three flags on the request control the merge behavior:

acceptNewColumns

acceptNewColumns is forced to false when the manifest is locked.

deleteMissingFromDB

deleteMissingFromDB=true permanently deletes any existing row whose entity key does not appear in the upload. Verify your CSV contains every row you want to keep before setting this flag.
deleteMissingFromDB is forced to false when the manifest is locked.

onConflictUpdateDB

A conflict is a row whose entity key matches an existing row but where at least one value column differs. If more than 10% of values changed during a conflicting upload, the process appends a warning to statusDescription (WARNING: More than 10% of values changed. This may indicate a problem with the data.).

How the three flags combine

What you get back: process stats

After every successful upload, the process record’s stats field contains the row-level breakdown: If the upload failed, stats may be empty and the error appears in statusDescription instead.

What’s next

Manifest reference

Define columns, types, the date format, renames, and ignored columns.

Upload API reference

Endpoint, parameters, code samples, and HTTP status codes.