NightSkyJeff
NightSkyJeff13mo ago

nightskyjeff – 03-10 Aug 1

I'd like to use ssh2-sftp-client's sftp.get(filename, writableStream) in conjunction with a pipeline, so that I don't need to store the writableStream contents somewhere first and then read from there to go through the pipeline.
2 Replies
NightSkyJeff
NightSkyJeff13mo ago
I think I figured it out, with Transform and .pipe()
await ssh.get(
filenameCsv,
transform
.pipe(csvParser)
.pipe(jsonToCsv)
.pipe(
bucket.file(filenameCsv).createWriteStream({
resumable: false,
validation: false,
contentType: "auto",
})
)
);
await ssh.get(
filenameCsv,
transform
.pipe(csvParser)
.pipe(jsonToCsv)
.pipe(
bucket.file(filenameCsv).createWriteStream({
resumable: false,
validation: false,
contentType: "auto",
})
)
);
reactibot
reactibot12mo ago
This thread hasn’t had any activity in 36 hours, so it’s now locked. Threads are closed automatically after 36 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1135771533609025606