> For the complete documentation index, see [llms.txt](https://documentation.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.dnanexus.com/developer/ingesting-data/data-model-loader/ingestion-data-types.md).

# Ingestion Data Types

{% hint style="info" %}
An Apollo license is required to use Data Model Loader on the DNAnexus Platform. Org approval may also be required. [Contact DNAnexus Sales](mailto:sales@dnanexus.com) for more information.
{% endhint %}

## Supported Field Types

Data Model Loader supports specific field types during ingestion of raw files. The following field types are supported with the outlined configurations. During ingestion, all values in a field must conform to the supported and indicated type format, including special values used to indicate "Sparse" values.

For multi-select fields, enter the field in the raw data CSV as `<value 1>|<value 2>|<value n>` with a `|` delimiter for entries where multiple values are selected. A field can be treated as multi-select even if not all entries have multiple values. Each individual value in a multi-select field must be non-null / non-empty.

### Date

A date without special values (other than NULL) with day granularity. An example is *Date of Birth*.

Ingestion files are configured as follows:

| `type` | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| ------ | ------------- | ------------------ | ----------------- | ---------------------------- |
| `date` |               |                    |                   |                              |

The following formats are supported for Date:

* `yyyy`
* `yyyy-[m]m`
* `yyyy-[m]m-[d]d`

#### Date Sparse

A date with a few special values (other than NULL). An example is *Date of Diagnosis* where a date of "1900-01-01" indicates "Forgot to ask question".

Ingestion files are configured as follows:

| `type` | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| ------ | ------------- | ------------------ | ----------------- | ---------------------------- |
| `date` | `<provided>`  | `yes`              |                   |                              |

### Datetime

A datetime without special values (other than NULL). An example is *datetime of hospital admission*. Datetimes are stored in the system as UTC.

Ingestion files are configured as follows:

| `type`     | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| ---------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `datetime` |               |                    |                   |                              |

The following formats are supported for Datetime

* `yyyy`
* `yyyy-[m]m`
* `yyyy-[m]m-[d]d`
* `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
* `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
* `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
* `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`
* `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
* `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
* `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
* `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`

#### Datetime Sparse

A datetime with microsecond granularity and a few special values (other than NULL). An example is *Datetime of Treatment* where a date of "1900-01-01 01:00" indicates "NA".

Ingestion files are configured as follows:

| `type`     | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| ---------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `datetime` | `<provided>`  | `yes`              |                   |                              |

### Float

A double-precision floating point measurement without special values (other than NULL). An example is *Weight.*

Ingestion files are configured as follows:

| `type`  | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| ------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `float` |               |                    |                   |                              |

The following formats are supported for Float

* `#.#`
* `#.#E#`
* `-#.#E#`

#### Float Sparse

A double-precision floating point measurement with a few special values (other than NULL). An example is *Blood Glucose Level* where a value of "-1.0" indicates "Read Failure"*.*

Ingestion files are configured as follows:

| `type`  | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| ------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `float` | `<provided>`  | `yes`              |                   |                              |

### Integer

An integer measurement without special values (other than NULL). An example is *Age.*

Ingestion files are configured as follows:

| `type`    | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| --------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `integer` |               |                    |                   |                              |

The following formats are supported for Integer

* `#`

#### Integer Sparse

An integer measurement with a few special values (other than NULL). An example is *Cups of Coffee Consumed* where a value of "-1" indicates "Prefer not to answer"*.*

Ingestion files are configured as follows:

| `type`    | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| --------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `integer` | `<provided>`  | `yes`              |                   |                              |

### Integer Categorical

A single-choice value (string) from a controlled vocabulary of possible options (or NULL), originally encoded as an integer. An example is *Have you traveled in the last 30 days?* where a value of "1" means "Yes" and a value of 0 means "No"

Ingestion files are configured as follows:

| `type`    | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| --------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `integer` | `<provided>`  |                    |                   |                              |

The Integer Categorical fields support the same formats as the [Integer](#integer) field.

#### Integer Categorical Hierarchical

A single-choice value (string) from a controlled vocabulary of possible options (or NULL) that are organized in a hierarchy, originally encoded as an integer. An example is *Job Code At Visit* where an integer of "12" means "VP of Operations" which is a child of "Corporate Managers And Senior Officials".

Ingestion files are configured as follows:

| `type`    | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code`  |
| --------- | ------------- | ------------------ | ----------------- | ----------------------------- |
| `integer` | `<provided>`  |                    |                   | `<provided for child values>` |

#### Integer Categorical Multi-select

A multiple-choice value (string) from a controlled vocabulary of possible options (or NULL), originally encoded as an integer. An example is *Patient Ethnic Background* where 0 means "African", 1 means "Caucasian", 2 means "Asian", and other numeric values represent additional ethnicities. A patient may be part of one or many races.

Ingestion files are configured as follows:

| `type`    | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| --------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `integer` | `<provided>`  |                    | `yes`             |                              |

#### Integer Categorical Multi-select Hierarchical

A multiple-choice value (string) from a controlled vocabulary of possible options (or NULL) that are organized in a hierarchy, originally encoded as an integer. An example is *Cancer Codes Self Reported* where 0 means "Parotid Gland Cancer", 2 means "Other Salivary Gland Cancer", and both have a parent of 3 "Salivary Gland Cancer", and a patient may have one or more cancer codes entered.

Ingestion files are configured as follows:

| `type`    | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code`  |
| --------- | ------------- | ------------------ | ----------------- | ----------------------------- |
| `integer` | `<provided>`  |                    | `yes`             | `<provided for child values>` |

### String

A free-form string without special values (other than NULL). An example is *UUID* or *Special Instructions.*

Ingestion files are configured as follows:

| `type`   | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| -------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `string` |               |                    |                   |                              |

The following formats are supported for String

* any string
* for quote escaping use `""`. To get `<the "quote" phrase>`, use `<"the ""quote"" phrase">`

### String Categorical

A single-choice value (string) from a controlled vocabulary of possible options (or NULL), originally encoded as a string. An example is *T-Shirt Size* where "S" means "Small"

Ingestion files are configured as follows:

| `type`   | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| -------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `string` | `<provided>`  |                    |                   |                              |

String Categorical supports the same formats as the [String](#string) field

#### String Categorical Hierarchical

A single-choice value (string) from a controlled vocabulary of possible options (or NULL) that are organized in a hierarchy, originally encoded as a string. An example is *State of Residency* where a value of "CA" means "California" and a value of "OR" means "Oregon" and both values have a parent of "US" that means "United States of America".

Ingestion files are configured as follows:

| `type`   | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code`  |
| -------- | ------------- | ------------------ | ----------------- | ----------------------------- |
| `string` | `<provided>`  |                    |                   | `<provided for child values>` |

#### String Categorical Multi-select

A multiple-choice value (string) from a controlled vocabulary of possible options (or NULL), originally encoded as a string. An example is *Primary Diagnosis* where values are encoded to match [ICD-10 diagnostic codes](https://icd.who.int/browse10/2016/en).

Ingestion files are configured as follows:

| `type`   | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| -------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `string` | `<provided>`  |                    | `yes`             |                              |

#### String Categorical Multi-Select Hierarchical

A multiple-choice value (string) from a controlled vocabulary of possible options (or NULL) that are organized in a hierarchy, originally encoded as a string. An example is *Secondary Diagnosis*, where an entry may have one or more values encoded to match a controlled vocabulary.

Ingestion files are configured as follows:

| `type`   | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code`  |
| -------- | ------------- | ------------------ | ----------------- | ----------------------------- |
| `string` | `<provided>`  |                    | `yes`             | `<provided for child values>` |

#### String Categorical Sparse

A single-choice value (string) from a controlled vocabulary of possible options (originally encoded as a string) or a write-in value (or NULL). Most values are expected to be from the controlled vocabulary. An example is *Prescribed Medication* where each entry is a single item from a list of RXNORM medications where "RX5640" means "Ibuprofen" or other standard medication codes, but a value may be written in if the medication is not available as an option.

Ingestion files are configured as follows:

| `type`   | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code` |
| -------- | ------------- | ------------------ | ----------------- | ---------------------------- |
| `string` | `<provided>`  | `yes`              |                   |                              |

#### String Categorical Sparse Hierarchical

A single-choice value (string) from a controlled vocabulary of possible options that are organized in a hierarchy (originally encoded as string) or a write-in value (or NULL). Most values are expected to be from the controlled vocabulary. An example is *Previous Diagnostic Codes ICD-10* where the code "D03" has meaning "Melanoma in situ", and the code "D03.0" has meaning "D03.0 Melanoma in situ of lip". The code "D03.0" is hierarchically situated under "D03". Alternatively, the value may be any other free-form string that is not part of ICD-10, such as "Other trauma".

Ingestion files are configured as follows:

| `type`   | `coding_name` | `is_sparse_coding` | `is_multi_select` | (`coding.csv`) `parent_code`  |
| -------- | ------------- | ------------------ | ----------------- | ----------------------------- |
| `string` | `<provided>`  | `yes`              |                   | `<provided for child values>` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.dnanexus.com/developer/ingesting-data/data-model-loader/ingestion-data-types.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
