> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracebloc.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Tabular classification

> Dataset template for tabular classification: one CSV with features and a class column, the typed schema, ingest.yaml and the checks the data ingestor runs.

Predict a class from table columns. The dataset is a single CSV with a header row: feature columns plus one class column. There are no per-sample files.

## Folder layout

```text theme={null}
/data/shared/churn/
└── customers.csv
```

* One CSV, UTF-8, comma-separated, with a header row.
* Every column has one consistent type. Feature columns are typically numeric; the class column may be text or integer codes.

## Data CSV

```csv theme={null}
id,feature_00,feature_01,feature_02,label
1,1.6680773978214032,-0.903902455,6.661496229171176,0
2,0.7017820066004041,1.9789541930566035,5.826137181850707,0
4,4.427524335645055,-1.543700586,6.2987092866052485,1
```

| Column                      | Meaning                                                                                                                                                                                       |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| feature columns             | Declared in `schema` with their SQL type and stored as table columns. A column that is not in `schema` is not stored.                                                                         |
| class column (`label` here) | Named by `label:`; **not** declared in `schema`. At least two distinct values are required.                                                                                                   |
| `id`                        | Optional in your CSV, but it cannot be declared in `schema` (`id` is reserved). To use it as the row id, set `data_id: {strategy: column, column: id}` — only if it carries no personal data. |

In `schema` columns, empty cells and exactly the tokens `NA`, `N/A`, `n/a`, `NULL`, `null`, `None`, `none`, `NaN`, `nan`, `<NA>`, `#N/A` (case-sensitive) are stored as NULL.

## ingest.yaml

```yaml theme={null}
apiVersion: tracebloc.io/v1
kind: IngestConfig
category: tabular_classification
table: churn_train
intent: train
csv: /data/shared/churn/customers.csv
schema:
  feature_00: FLOAT
  feature_01: FLOAT
  feature_02: FLOAT
label: label
```

| Field              | Required | Meaning                                                                                                                                                                               |
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `csv`              | yes      | Path to the data CSV.                                                                                                                                                                 |
| `schema`           | **yes**  | Column name to SQL type for every feature column you want stored. Every schema column must exist in the CSV header. See [SQL types](/create-use-case/templates#sql-types-for-schema). |
| `label`            | yes      | Name of the class column. String shorthand is fine; the value is sent to the platform as is.                                                                                          |
| `columns`          | no       | Per-column `unit` and `ordinal` facts for consistency checks across combined datasets.                                                                                                |
| `data_id`          | no       | Row id strategy; see [the contract](/create-use-case/templates#the-ingestyaml-contract).                                                                                              |
| `spec.csv_options` | no       | `delimiter`, `quotechar`, `escapechar`, `chunk_size`.                                                                                                                                 |

## What the ingestor checks

| Check           | Rejects                                                                                                                                                                                                                                                              |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Data types      | Duplicate header names; a schema column missing from the CSV; any value that does not fit its declared type (non-numeric in `INT`/`FLOAT`, over-long `VARCHAR`, `inf`, out-of-range integers, unparseable dates); unknown SQL type names. The whole file is scanned. |
| Label diversity | Fewer than two distinct label values (after whitespace stripping).                                                                                                                                                                                                   |

Plus the [checks every ingest runs](/create-use-case/templates#checks-every-ingest-runs).

## Sample dataset

The template ships a synthetic CSV with `id`, three `FLOAT` features (`feature_00`, `feature_01`, `feature_02`) and a binary `label` column — the rows shown above are its first rows. The `ingest.yaml` above ingests it as is; only `csv:` changes to wherever you staged the file.

## Next steps

* Stage the data and run the ingest: [Prepare Data](/create-use-case/prepare-dataset)
* Shared rules for every template: [Dataset templates](/create-use-case/templates)
