Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.3K Views
|
4 Replies
|
1 Total Like
View groups...
Share
Share this post:

Confusion when exporting TSV file within a zip file if it's called CSV

Posted 1 year ago
Attachments:
POSTED BY: Sean G
4 Replies
Posted 1 year ago

Hi Rohit,

many thanks for the reply and solution. I also found another solution to the issue that appears to fix it: If I extract the CSV file within the zip file using the "Byte" option, it doesn't enclose each line with "".

Import["20230101.export.CSV.zip", "20230101.export.CSV", "Byte"]

The resulting code was really fast, I was able to process about 6000 files in a few hours. The bulk inserts also worked really well with only 3 bad files (representing 3 days in about 20 years of data). It took a few hours to do all the bulk inserts. The resulting table has over 1B entries. Before I start playing with the DB, I'm going to look at other potential data sources to add. Thanks again for your suggestion.

POSTED BY: Sean G

There is no need to do it manually. You could write WL code that generates the series of unzip/mv commands and execute it using RunProcess or ExternalEvaluate.

POSTED BY: Rohit Namjoshi
Posted 1 year ago

The only issue I have with this is that there are hundreds of these files and more are added on a regular basis so I want to have a mathematica script that automatically processes these files rather than doing it manually.

POSTED BY: Sean G
Posted 1 year ago
POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard