-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserving the original file type for ingested tabular files is broken as of 4.6.2 #3952
Comments
Let's also at least do a little investigation of #2822 |
A direct effect of this for the user is that downloading the original results in getting it without any extension. They still get a correct file, and if they figure out what to open it with - Stata, SPSS, etc. - it can be used... but definitely a usability issue. |
(the above has been confirmed) |
Checked in a quick fix, in branch 3952-fix-original-type. |
@pdurbin #2822 is pretty straightforward. When a file is ingested, its type becomes "tabular". But the original type is preserved in DataTable.OriginalFileFormat. |
pull request: #3954 |
properly preserving the original type #3952
Tabular ingest has been modified in 4.6.2 to better handle error conditions, and prevent leaving the files in "half-ingested" state. To achieve this we had to change the order in which we modify the content of the file and the database entries. One unfortunate side effect of that change ia that we now have this line:
dataFile.setContentType(FileUtil.MIME_TYPE_TAB);
before this one:
tabDataIngest.getDataTable().setOriginalFileFormat(dataFile.getContentType());
meaning, the type is already overwritten by the time we try to preserve it.
The fix is to swap the order of the 2 lines (trivial).
But also provide a script, or an API call that would properly reset these original format entries for all the files that were ingested in 4.6.2; fairly straightforward too.
The text was updated successfully, but these errors were encountered: