# File To Dataset

```
POST 
/v1/files/:file_id/dataset
```

Make a dataset of a table the account already holds as a file.

A CSV, one sheet of an Excel workbook (`sheet`, the first by default), or a table read from a picture (`table`, from 0, of what `read_file` finds in it; the picture is read first if it has not been). The rows go through the same upload and ingestion as `POST /v1/datasets` and its upload: the answer is the new `datasetId` and its `cleanSQLName` (the alias to name in SQL), with `status: processing` while the rows load; the dataset reads READY when they are in. `headerRow` leaves out the rows above the column names. `reach` says who besides you can already open the dataset.

Needs the right to see the file and to add a dataset to `folderId` (left out: your private folder). A file that holds no table (Word, PowerPoint, text, a PDF) is 422 `not_tabular`; a sheet or a table that is not there is 422 `sheet_not_found` or `table_not_found`. Like a dataset upload, it may change once made with `replace_dataset_contents` but is never put on a refresh schedule.

## Request[​](#request "Lien direct vers request")

## Responses[​](#responses "Lien direct vers Responses")

* 202
* 403
* 404
* 422

Successful Response

`error` is `feature_not_offered`: files are not included for this account (`feature` is `files`), or the target is the account's capture folder and capture is not included (`feature` is `capture`). An account admin can switch either on.

Not found

Validation Error
