Skip to main content

Vehicle File Import

Introduction

This is generic vehicle file import for any manufacturer. This will import vehicle file to Cloud SQL for PostgreSQL

Applicable Manufacturers

  • KIA

Fields

Field NameDescriptionDatatypeValidationMax lengthMandatoryExample
RegistrationVehicle Reg NumberStringA-Z and 0-9 & All Special Char10NMH12JBS
VINVINStringA-Z and 0-917YABC2D4GHY47524999
MIOCNModelstringA-Z and 0-920YASW5ZHZ7ZKK732
ModelYrModel YearNumber0-94Y2024

Note: If there are more columns in the csv, those will be ignored

Importing a file

Preparation

  1. Upload the file with filename as vehicle_reg.csv into fnp-imports/{manufacturer}(E.g. fnp-imports/kia) storage bucket

Validation

Through Cloud Scheduler

  1. Go to Cloud Scheduler
  2. Run Manufacturer_vehicle_file_validation job (job name could be different on other env)

Local

  1. Add the vehicle.csv file in importFiles folder
  2. Run npm run validate:vehicle can control the number of lines to validate using -l(number of lines), -s (start line) and -m (manufacturer)arguments

Importing

Through Cloud Scheduler

  1. Go to Cloud Scheduler
  2. Run Manufacturer_vehicle_file_import job (job name could be different on other env)

Local

Same as Validation, just the command is npm run import:vehicle

Testing

  1. Data will be inserted to Cloud SQL for PostgreSQL under fpn database in table vehicle.
Status: Accepted
Category: Protected
Authored By: Gladson on Feb 07, 2025
Revisions