Skip to content

Commit

Permalink
Fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
rpbouman committed Dec 3, 2024
1 parent b76cee6 commit 30c0c8e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/ExportUi/ExportDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class ExportUi {
"ESCAPE": `'${escape.replace('\'', "''")}'`,
"DATEFORMAT": `'${dateFormat.replace('\'', "''")}'`,
"TIMESTAMPFORMAT": `'${timestampFormat.replace('\'', "''")}'`,
"COMPRESSION": compression,
"COMPRESSION": compression.value,
};
mimeType = 'text/csv';
fileExtension = 'csv';
Expand All @@ -161,7 +161,7 @@ class ExportUi {
"FORMAT": 'JSON',
"DATEFORMAT": `'${dateFormat.replace('\'', "''")}'`,
"TIMESTAMPFORMAT": `'${timestampFormat.replace('\'', "''")}'`,
"COMPRESSION": compression,
"COMPRESSION": compression.value,
"ARRAY": rowDelimiter.toUpperCase()
};
mimeType = 'application/json';
Expand All @@ -171,7 +171,7 @@ class ExportUi {
compression = exportSettings[exportType + 'Compression'];
copyStatementOptions = {
"FORMAT": 'PARQUET',
"COMPRESSION": compression,
"COMPRESSION": compression.value,
};
mimeType = 'application/vnd.apache.parquet';
fileExtension = 'parquet';
Expand Down Expand Up @@ -202,12 +202,12 @@ class ExportUi {
data = sql;
}

if (compression && compression !== 'UNCOMPRESSED'){
if (compression && compression.value !== 'UNCOMPRESSED'){
if (exportType === 'exportParquet'){
fileExtension = `${compression.toLowerCase()}.${fileExtension}`;
fileExtension = `${compression.value.toLowerCase()}.${fileExtension}`;
}
else {
switch (compression){
switch (compression.value){
case 'GZIP':
mimeType = 'application/gzip';
break;
Expand All @@ -217,7 +217,7 @@ class ExportUi {
default:
mimeType = 'application/octet-stream';
}
fileExtension += `.${compression.toLowerCase()}`;
fileExtension += `.${compression.value.toLowerCase()}`;
}
}

Expand Down Expand Up @@ -396,7 +396,7 @@ class ExportDialog {
valueProperty = 'value';
}
var value = control[valueProperty];
exportSettings[id] = value;
exportSettings[id] = control.tagName === 'SELECT' ? {value: value} : value;
return;
case 'object':
if (setting instanceof Array) {
Expand Down

0 comments on commit 30c0c8e

Please sign in to comment.