# When to use an adaptor

You can use an adaptor whenever the data you need is not in the format, shape or order you need it to be in to be able to work with it. For example, it is quite common that one dataset might use a location description such as a zip or postcode to define an area's boundaries. Other datasets may use a neighborhood census tract as a boundary. These definitions are not always immediately comparable: there may be more than one neighborhood census tract that is covered by a single zip/postcode.

Sometimes you can use an adaptor to apply a standard – taking messy data and applying a consistent date format, or converting from one known standard to another that will work better for your project.

## Deciding whether an adaptor is needed

To decide whether you need to use an adaptor to aid interoperability in your project, we recommend analysing how data items are described in the relevant datasets, for example:

* Are date fields in the same format?
* Are location fields in the same format?
* Are currency fields using the same format?
* Are number fields using the same number of decimal points or using whole integers?

If you decide to use an adaptor, the next steps include:

* deciding on what data standard/format you want all data to be described in
* creating a methodology for how to transform the datasets to the same format
* considering documenting the chosen format to avoid the need for adaptors in future
* considering putting rules in systems to validate future data inputs and ensure only the agreed format will be accepted.


---

# 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/when-to-use-an-adaptor.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.
