How to unzip .gz files?

Hi is there an extension or other workaround to get Knime to unzip .gz files?
I am using Knime 4.3 and the “decompress” node can’t handle .gz files.

Greetings!

Gz files are no archives if I’m not misstaken. That’s why the nodes does not handle those anyway I’ll look into it. Some of our readers support reading directly from gz files, but I don’t know the content of your file / use case though

1 Like

CSV Reader can directly read .gz files if the content behind is (well) a CSV file.

Other than that I have experimented with R package

library(R.utils)

# gzip und gunzip CSV file
# [R] How to unzip a .gz file

R.utils::gzip(filename = “iris.csv”, remove=FALSE, overwrite=TRUE)
R.utils::gunzip(filename = “iris.csv.gz”, remove=FALSE, overwrite=TRUE)

and the gzip/gunzip function.

In addition, you could explore these suggested solutions:
https://www.xspdf.com/resolution/50478978.html

1 Like

Hi mlauber,

you are right it seems that the the .csv reader AND File Reader are able to read into .gz files.
I am saying ‘seems’ since i could not verify that everything is working right since i am having some trouble with my knime installation since i updated to version 4.3 this morning. But thanks to you it looks like it would be working.

@Mark_Ortmann: has something changed how version 4.3 interacts with Windows UAC? I am asking because i had the problem that both the file reader and csv reader could not show me the content of the folderwhere the file is located:
Unbenannt

It only showed an empty folder no matter what i chose for “Dateityp”.

After i restartet Knime with Admin permissions, it showed the content of the folder in both CSV and filereader.

At this point i must say: that i am still on a Win7 (64bit) machine. Maybe that causes this?

Another thing i noticed after i got the process to run, it took the filereader with 5:12min ~ 25% longer to read the file (~1.8GB) than under the version i had before - i think it was version 4.12ish. But the new csv reader read it quicker than the old one

Can i downgrade somehow again or is it safe to have 2 different versions of Knime installed on the same machine? Can one donwload older versions of Knime somewhere?

Anyway thanks and a good weekend!