# Data adaptors

A data adapter is any method, tool or process used to exchange data between two different systems. It can be very simple or very complex, but its function is to extract or read some data, and write an amended version after performing some transformation on it (sometimes known as ‘[Extract, Transform and Load](https://www.webopedia.com/TERM/E/ETL.html)’). This might be:

* a calculation, for example expressing an absolute value as a percentage of the total, or changing date of birth to current age
* a conversion, for example converting inches to centimeters, date to datetime format, or easting-northing to longitude-latitude.
* a lookup, for example assigning towns to healthcare resourced catchment areas.

Box 1 illustrates how a data adapter can be used to standardise data.

{% hint style="info" %}
**Box 1: Using a data adapter to standardise date formats**

*Scenario:* A dataset has been created from several sources that combine test results including the date the test was administered. However, the date format used by the datasets varies from row to row. If part of your project involves plotting these test results over time, this variation will make that difficult to do.
{% endhint %}

Start by choosing an appropriate standard date format and applying it to each value in the ‘test\_date’ column.

![Data as supplied](/files/I9FnU6OAGCDmqgYAmQsh)

![Data with the date in DD/MM/YYYY format](/files/xBz4yybcRia0HYl0sl2M)

Now we have a dataset with a consistent date format, but that’s only half the job done. If we pass this data to someone else to work on, can they easily tell whether we’ve used DD/MM/YYYY or is it in fact MM/DD/YYYY? From the three rows shown here, it could be either. While this is consistent, it is not necessarily a good standard to use. A better choice is one of the ISO date formats, for example YYYY-MM-DD.

![Data with the date in ISO 8601 format](/files/4FdzU3dqLdkWLTuoMZVl)

Document an explanation of the data field and the standard applied, for example: test-date: Date of self-administered nasal swab; described in the format: datetime ISO 8601.


---

# 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://open-data-institute.gitbook.io/data-governance-playbook/play-four-making-data-interoperable/data-adaptors.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.
