importing-files

Importing files

BlackBox Analytics imports CSV, TSV, plain-text and Excel (.xlsx) files. This page describes exactly what the importer does, so you can predict the result before you press Create dataset — and fix a file when the result is wrong.

Uploading requires the analyst or admin role. Viewers cannot upload.

See also: datasets and field configuration for what happens once the data is in, and troubleshooting when a job fails.


1. Upload

Choose Datasets → New dataset → Upload a file, or Admin → Files → Upload.

check rule
extension must be one of BBA_ALLOWED_UPLOAD_EXTENSIONS (default .csv, .tsv, .txt, .xlsx)
size at most BBA_MAX_UPLOAD_MB megabytes (default 512)
content the file must contain supported tabular data; renamed documents, images, archives, and other binary files are rejected

Deleting a file removes the bytes from disk. It never deletes a dataset that was already imported from it.

2. Inspection

Every upload is inspected immediately; the result is what the "create dataset" screen shows you.

Encoding. A byte-order mark wins (UTF-8 or UTF-16). Otherwise the importer tries UTF‑8, then detects the encoding, with Latin‑1 as a last resort. You can override it when creating the dataset.

Delimiter. Detected automatically from , ; tab and |. .tsv is always tab. You can override it when creating the dataset.

Header. The first row is treated as a header unless it contains values that parse as numbers or dates, in which case the columns are named column_1, column_2, … You can override this too.

Column names are trimmed, whitespace-collapsed, de-duplicated (name, name_2) and blanks are filled positionally (column_3). A phantom trailing column caused by trailing commas is dropped.

Types are inferred from up to 50 000 sampled rows:

inferred type recognised as
boolean true/false, yes/no, y/n, t/f, and 1/0 when at least one word-form value is present — a pure 0/1 column stays an integer
integer whole numbers, tolerating thousands separators, currency symbols (£ $ € ¥ ₹ ₽), % and (123) for −123
number the same, with decimals. 1,234.56 and 1.234,56 are both understood; a lone comma is read as a decimal point unless it separates a group of exactly three digits
date / datetime ISO‑8601, YYYY-MM-DD, DD/MM/YYYY, MM/DD/YYYY, DD-MM-YYYY, DD.MM.YYYY, 1 Mar 2024, March 1, 2024, with optional HH:MM[:SS]
text everything else

DD/MM vs MM/DD is decided by majority: any value whose first component exceeds 12 proves day-first, any value whose second component exceeds 12 proves month-first, and the larger count wins. With no evidence either way the importer assumes day-first. If your file is ambiguous and American, set the column type explicitly or convert the column to ISO dates before uploading.

In .xlsx files cells keep their spreadsheet types, so date-formatted cells arrive as dates without any guessing. Only the first sheet is read unless you name another one.

3. Create the dataset

On the Create dataset screen, you can override:

Set a primary key whenever you have one. It lets a later import update matching records instead of duplicating them. Without a key, every import adds records.

Track the import under Admin → Jobs.

4. Import

The progress bar updates while BlackBox Analytics reads and checks the file.

Messy input is tolerated by design:

5. Adding more data later

Either action recalculates the dataset profile, refreshes insights configured to update when data changes, and starts discovery if it is enabled.

6. Troubleshooting

symptom cause and fix
every column is one long text column the delimiter was mis-detected — set options.delimiter
first data row is missing it was taken as a header — set options.has_header: false
dates are off by day/month ambiguous DD/MM data — see §2, or convert to ISO
leading zeros disappeared the column was inferred numeric — set column_types: {"ref": "text"}
a numeric column arrived as text more than 20 % of its values were unparseable; check the job result's columns_downgraded_to_text
accented or Cyrillic text is mangled wrong encoding detected — set options.encoding
a re-import duplicated everything the dataset has no primary key field