json export in configurator, prepare for table mapping

This commit is contained in:
Jan Prochazka
2020-06-11 21:26:35 +02:00
parent b520501d1f
commit b873dd75d3
2 changed files with 66 additions and 22 deletions

View File

@@ -24,9 +24,16 @@ export default async function createImpExpScript(values) {
});
const targetVar = script.allocVariable();
script.assign(targetVar, 'csvWriter', {
fileName: `${fullName.pureName}.csv`,
});
if (values.targetStorageType == 'csv') {
script.assign(targetVar, 'csvWriter', {
fileName: `${fullName.pureName}.csv`,
});
}
if (values.targetStorageType == 'jsonl') {
script.assign(targetVar, 'jsonLinesWriter', {
fileName: `${fullName.pureName}.jsonl`,
});
}
script.copyStream(sourceVar, targetVar);
script.put();