# File requirements

The technical binding for a UDP loading schema is CSV. A context dataset that conforms with a loading schema is a set of comma-separated value (CSV) files.

### One CSV file per Entity <a href="#filerequirements-onecsvfileperentity" id="filerequirements-onecsvfileperentity"></a>

Each entity of a UDP loading schema is represented with a distinct CSV file. For example, if the UDP loading schema requires that you produce data for the Person, Course offering, and Course section entities, then you will generate three CSV files in a single dataset; one for each entity.

### CSV headers <a href="#filerequirements-csvheaders" id="filerequirements-csvheaders"></a>

The first row of each CSV file must be a header row. The purpose of a header row is to define the columns by which you organize an entity’s data. The order of the columns in your CSV does *not matter* so long as you specify a header row and conform your data to its order.

The headers must correspond to each element in the entity. Use the “code” value of each element for the header value in your CSV file.

For example, suppose that the UDP loading schema uses four of the UCDM’s Course offering elements to define the Course offering data it requires: Course title, Course subject, Course number, and Course description. According to the UCDM, the code values for each of these elements are `title, subject, number,` and `description`, respectively. These values must be used in the header row of the file. The order of the values in the header row must correspond to the order of the data in the subsequent rows of the CSV file (each of which represents one record).

### Data requirements <a href="#filerequirements-datarequirements" id="filerequirements-datarequirements"></a>

Your CSV files must:

* Use a comma (“,”) as the field delimiter
* Use double-quotes as the quoting character
* Use backslash (“\”) as the escape character
* Use the UTF-8 character encoding

### Null values <a href="#filerequirements-nullvalues" id="filerequirements-nullvalues"></a>

Null values are acceptable if the element is not required by the UDP loading schema. The UDP will interpret a blank value as a NULL value. To maintain integrity of the data, do *not* represent NULL values as empty strings (i.e., ""). Rather, represent NULL values with blanks in the final dataset.

### Filenames <a href="#filerequirements-filenames" id="filerequirements-filenames"></a>

The filename for each CSV file in a dataset must also be properly formatted as follows:

`<entity>_<date>.csv`

In the above example, the entity value will be the lower-case version of the entity name. The date value will correspond to the date on which the dataset was generated in YYYY-MM-DD format. For example, if your data set must include data for the Person entity, then the Person data your tool generates on a particular date might look like this:

`person_2022-09-01.csv`

Some entities are given a name with multiple terms, such as “Academic session.” In this case, use an underscore to connect the terms of the entity:

`academic_session_2022-09-01.csv`

Some entities in the UCDM express relationships between two entities. For example, the “Person-Academic term” entity expresses the relationship between Persons and particular Academic terms. In the case of a composite, use *two underscores* to separate the constituent entities of the composite entity:

`person__academic_term_2022-09-01.csv`


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://resources.unizin.org/products/data-and-analytics/unizin-data-platform/data-integrations/context-data-integration/file-requirements.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
