cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMPĀ® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

How to read gz file from URL

I have 1 gz file in URL like http://<<domainName>>/testCSV.txt.gz 

how to read it from JMP

6 REPLIES 6
Craige_Hales
Super User

Re: How to read gz file from URL

gzblob = loadtextfile("https://drawoutside.com/example.txt.gz",blob());
blob = gzipuncompress(gzblob);
// one way...
text = blobtochar(blob);
show(text);
// another
dt = open(blob,"text");
Craige

Re: How to read gz file from URL

its able to open file however it showing only first line of file. bt If we unzip manually that file and open we can see data.

Craige_Hales
Super User

Re: How to read gz file from URL

We'll need more information.

 

  • Can you share a file? If not, can you share the log output from
...
show(length(gzblob));
blob = gzipuncompress(gzblob);
show(length(blob));
show(left(char(blob),2000)); 
...

The goal of the 2000 is to see enough of the first and second line of data to understand what is truncating the file. I'll guess there is a null byte between the lines, and the last show(...) will display it.

 

  • Are you printing the data to the JMP log or opening a table?
  • Are there any log messages?
  • If we unzip...and open we can see data - what tool do you use to see it? Notepad? JMP? JSL?
  • Are you on Windows or Mac? What version of JMP?
Craige

Re: How to read gz file from URL

Yes, actually that GZ file itself is CSV each row separated by next line 

Re: How to read gz file from URL

Are you printing the data to the JMP log or opening a table? -> opening it as table
Are there any log messages? --> log shows on headers
If we unzip...and open we can see data - what tool do you use to see it? Notepad? JMP? JSL? --> if we unzip and open in any editor it will shows all data.
Are you on Windows or Mac? What version of JMP? --> window machine

Craige_Hales
Super User

Re: How to read gz file from URL

Without seeing any data it is going to be hard to figure out what you are seeing. The log window picture you supplied stops just short of showing some data. If the data is sensitive, you might want to work through Tech Support rather than posting it here.

 

What should happen, with a valid xxx.csv.gz file, should look like this

opening a gz compressed csv file into a JMP data tableopening a gz compressed csv file into a JMP data table

Craige