Skip to content

Latest commit

 

History

History
94 lines (56 loc) · 2.22 KB

fts-xls.md

File metadata and controls

94 lines (56 loc) · 2.22 KB

FtsXlsTransform

Map fields for FTS producer, XLS file types

Example input data: stub

Transform function: implementation details

Parameters

  • record Object Piece of data to transform before going to harmonized storage.

Returns Project JSON matching the type fields.

getCodeByCountry

Gets country code from a country name. Contains a map of exceptions.

Parameters

  • countryName String The name of the country

Returns String The ISO 3166-1 country code

getNutsCodeLevel

Gets NUTS code level from a string

Parameters

Returns Number The level of NUTS or null if one can't be extracted

getBudget

Preprocess budget

Input fields taken from the record are:

  • Total amount
  • Funding Type
  • Type

Parameters

  • record Object The row received from parsed file

Returns Budget

getLocations

Preprocess project_locations Input fields taken from the record are:

  • Address
  • City
  • Postal code
  • Country / Territory
  • NUTS2
  • Geographical Zone

Parameters

  • record Object The row received from parsed file

Returns Array List of {Location} objects for project_locations field

getThirdParties

Preprocess third_parties

Input fields taken from the record are:

  • Name of beneficiary
  • Coordinator
  • Address
  • Country / Territory

Parameters

  • record Object The row received from parsed file

Returns Array List of {ThirdParty} objects for third_parties field