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.
Last updated