> For the complete documentation index, see [llms.txt](https://docs.rhinofcp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rhinofcp.com/data-schemas/auto-generated-data-schemas.md).

# Auto-Generated Data Schemas

Experience the effortless integration of various data types within the Rhino FCP using the ***Auto-Generate Data Schema from Data*** feature. This functionality adapts to your data type, eliminating the need for manual *Data schema* definition and ensuring smooth compatibility for your projects.

### How It Works

* **Importing Datasets:** When importing datasets, select ***Auto-generate Data Schema from Data*** to automatically create an inferred Data *Schema* that suits your data's characteristics.
* **Defining Code Outputs:** When defining your Code Object, opt for "*Auto-Generate Schema from Data*" for the *output Data Schema*. The system will create an inferred Data *Schema* to match your output data, ensuring compatibility.
* **Via the SDK:** If you are importing Datasets or defining Code Objects via the SDK, pass in `data_schema_uid = None` (for Datasets) or `output_data_schema_uid = None` (for Code Objects) to Auto-generate the Data S *chema*.

### Fully Supported Cases

* **Data is limited to a tabular File** - Simply provide the **Tabular Data File Path** when importing the dataset. If the tabular file is the output of a code object, the FCP expects it to be placed under `/output/dataset.csv`.
* **Data is limited to files in a folder** - Simply provide the path where the files are located.
  * The FCP will recursively search for all files under that path.
* **A combination of tabular and file data:** make sure to reference the file name in its appropriate line in the tabular file, e.g.:

|         |            |                     |
| ------- | ---------- | ------------------- |
| **Age** | **Gender** | **Filename**        |
| 64      | F          | /file\_data/F64.txt |
| 75      | M          | /file\_data/M75.txt |

#### A "Special" Case

* **Data is a combination of DICOM files and other file types with no tabular data** - In this case, the FCP will not be able to import the dataset as it would not know which DICOM file to associate with which of the other files. To resolve this, you need to create a csv file with the corresponding file paths, e.g.:

|               |                 |
| ------------- | --------------- |
| SeriesUID     | DiagnosticNotes |
| 2.24.1234.dcm | 1.txt           |
| 3.32.6543.dcm | 2.txt           |
| 1.45.6122.dcm | 3.txt           |

### Streamlined Integration

Discover the advantages of using ***Auto-Generate Data Schema from Data*** for your data integration needs:

* **Effortless Handling:** Import datasets or run code without the hassle of defining Data *Schemas* manually.
* **Adaptable Compatibility:** Inferred Data *Schemas* accommodate diverse data types, facilitating a unified data analysis environment.
* **Data Privacy Management:** Adjusts **Sensitive Data** settings based on dataset de-identification status, ensuring data security compliance. Allows for quick review of data schemas to protect privacy in data fields. See [Sensitive Datasets](/datasets/sensitive-datasets.md) for more information.
* **Efficient Data Transformation:** Seamlessly apply different code objects to your data without the need for manual Data *Schema* adjustments.

Leverage the ***Auto-Generate Data Schema from Data*** feature to simplify data integration and elevate your analysis within the Rhino FCP.
