UNPKG

ffc-pay-etl-framework

Version:

A framework for creating ETL pipelines in node

31 lines (26 loc) 663 B
const { Etl, Loaders, Transformers, Destinations } = require('ffc-pay-etl-framework') const csvFile = `${process.cwd()}/test/fixtures/SoilType.csv` const columns = [ 'Dist Code', 'Year', 'State Code', 'State Name', 'Dist Name', 'SOIL TYPE PERCENT (Percent)' ] const etl = new Etl.Etl() etl .loader(Loaders.CSVLoader({ path: csvFile, columns })) .transform(Transformers.FakerTransformer({ columns: [{ name: 'Dist Name', faker: 'location.city' }] })) .destination(Destinations.CSVFileDestination({ fileName: 'SoilType_Output.csv', headers: true, includeErrors: false, quotationMarks: true })) .pump()