Skip to content

Latest commit

 

History

History
155 lines (86 loc) · 3.11 KB

2014tc16i5cb007-csv.md

File metadata and controls

155 lines (86 loc) · 3.11 KB

2014tc16i5cb007CsvTransform

Map fields for 2014tc16i5cb007 producer, CSV 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.

getBudget

Preprocess budget.

Input fields taken from the record are:

  • Project final contract amount
  • Project EU co-financing rate

Parameters

  • record Object The row received from parsed file

Returns Budget

getDescription

Preprocess description.

Input fields taken from the record are:

  • Project call
  • Project intervention field
  • Last modified

Parameters

  • record Object The row received from parsed file

Returns String

getProjectId

Generates an ID for project_id.

Input fields taken from the record are:

  • Project code

Parameters

  • record Object The row received from parsed file

Returns String

getCodeByCountry

Gets country code from a country name.

Parameters

  • countryName String The name of the country

Returns String The ISO 3166-1 country code

getLocations

Preprocess project_locaions.

Input fields taken from the record are:

  • Region
  • Country

Parameters

  • record Object The row received from parsed file

Returns Array<Location>

getThirdParties

Preprocess third_parties.

Input fields taken from the record are:

  • Leading partner
  • Region
  • Country

Parameters

  • record Object The row received from parsed file

Returns Array<ThirdParty>

formatDate

Format date.

Parameters

  • date Date Date in DD.MM.YYYY format

Examples

input => '01.01.2009';
output => '2009-01-01T00:00:00.000Z';

Returns Date The date formatted into an ISO 8601 date format

getTimeframe

Preprocess timeframe.

Input fields taken from the record are:

  • Project start date
  • Project end date

Parameters

  • record Object The row received from parsed file

Returns Timeframe

getTitle

Preprocess title.

Input fields taken from the record are:

  • Project title

Parameters

  • record Object The row received from parsed file

Returns String