Read csv from URL
Valentine-Mario opened this issue · comments
Valentine Oragbakosi commented
Reading CSV files from URL seems like a feature that should be supported. Can't seem to find it
João Pimentel Ferreira commented
It seems is supported, read the docs
const request=require('request')
const csv=require('csvtojson')
csv()
.fromStream(request.get('http://mywebsite.com/mycsvfile.csv'))
.subscribe((json)=>{
return new Promise((resolve,reject)=>{
// long operation for each json e.g. transform / write into database.
})
},onError,onComplete);