<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HTTP request get (file download): Operation timed out after 60000 milliseconds in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/HTTP-request-get-file-download-Operation-timed-out-after-60000/m-p/224409#M44606</link>
    <description>&lt;P&gt;HTTP Request has a Timeout message.&amp;nbsp; The default is 60 seconds.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
request = New HTTP Request(
	Url( "https://community.jmp.com/html/assets/community-icons/community-icon-mastering.png" ),
	Method( "GET" ),
	Timeout( 120 )
);
bytes = request &amp;lt;&amp;lt; Send;
img = Open( bytes, jpg );
obj = New Window( "Mastering JMP", img );
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 Sep 2019 13:52:03 GMT</pubDate>
    <dc:creator>bryan_boone</dc:creator>
    <dc:date>2019-09-03T13:52:03Z</dc:date>
    <item>
      <title>HTTP request get (file download): Operation timed out after 60000 milliseconds</title>
      <link>https://community.jmp.com/t5/Discussions/HTTP-request-get-file-download-Operation-timed-out-after-60000/m-p/224384#M44599</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I want to import a csv file from an internal server ("http:....").&lt;/P&gt;&lt;P&gt;(JMP 14.0, Windows)&lt;/P&gt;&lt;P&gt;It generally worked quite well, but the file is getting larger and larger.&lt;/P&gt;&lt;P&gt;As I need to scan the full file (to get all data types right), I thought, it would be a good idea,&lt;/P&gt;&lt;P&gt;to first download the file to the $TEMP directory and than to import it.&lt;/P&gt;&lt;P&gt;So I implemented file download with http request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a smaller file it worked well again, but for the larger ones I get a timeout,&lt;/P&gt;&lt;P&gt;and I found no option to tell JMP to change that timeout,&lt;/P&gt;&lt;P&gt;except that I could change the registry, please see&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2009"&gt;@landon&lt;/a&gt;&amp;nbsp; in the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/message/225323" target="_self"&gt;https://community.jmp.com/message/225323&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is downloading a large file from http:... by "http request" the right method?&lt;/P&gt;&lt;P&gt;Is there another method to modify timeout without changing registry (my script needs to work at other users also)?&lt;/P&gt;&lt;P&gt;Is downloading before importing (using full scan) faster than direct import from server?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Georg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 11:10:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/HTTP-request-get-file-download-Operation-timed-out-after-60000/m-p/224384#M44599</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2019-09-03T11:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP request get (file download): Operation timed out after 60000 milliseconds</title>
      <link>https://community.jmp.com/t5/Discussions/HTTP-request-get-file-download-Operation-timed-out-after-60000/m-p/224405#M44605</link>
      <description>&lt;P&gt;I'm pretty sure JMP only downloads the file once for open("https...", type), even if the file needs to be scanned more than once (when type is "text" for csv files). I think the file is kept in memory for the text/csv case, which will limit the maximum size; for other types, the file may be saved to a temp file (the excel opener might &lt;EM&gt;need&lt;/EM&gt; to work from a disk file, for example).&lt;/P&gt;&lt;P&gt;So it is possible that downloading csv to a disk file might be slower (probably not by a noticeable&amp;nbsp;amount though). If the CSV file is approaching half your memory size (8GB file size on a 16GB machine...the JMP table will need memory too!) it might be necessary to download it first.&lt;/P&gt;&lt;P&gt;Not sure where the timeout happens, but an alternate approach to downloading could look like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// here's a way to download a URL to a local file
filename = Save Text File(
	"$temp/sample.csv", // extension is saved as CSV
	Load Text File(
		"https://data.cityofnewyork.us/api/views/kku6-nxdu/rows.csv?accessType=DOWNLOAD",
		blob
	)
);

dt1 = Open( filename ); // "text" not needed because extension is CSV

// here's a way to open directly
dt2 = Open(
	"https://data.cityofnewyork.us/api/views/kku6-nxdu/rows.csv?accessType=DOWNLOAD",
	"text" // here the extension might or might not be CSV, use "text" to make sure
);

// verify both ways make the same table
compare = dt1 &amp;lt;&amp;lt; Compare Data Tables(
	Compare with( dt2 ),
	Compare Data,
	Show Difference Summary( 0 ),
	Show Difference Plot( 0 )
);

If( compare &amp;lt;&amp;lt; Are Data Different,
	Write( "\!nwhy are they different?" ),
	Write( "\!nResults identical" )
);

Show( N Rows( dt1 ), N Cols( dt1 ), N Rows( dt2 ), N Cols( dt2 ) );

// clean up
compare &amp;lt;&amp;lt; closewindow;
Close( dt1, "nosave" );
Close( dt2, "nosave" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5036"&gt;@bryan_boone&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 13:43:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/HTTP-request-get-file-download-Operation-timed-out-after-60000/m-p/224405#M44605</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-09-03T13:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP request get (file download): Operation timed out after 60000 milliseconds</title>
      <link>https://community.jmp.com/t5/Discussions/HTTP-request-get-file-download-Operation-timed-out-after-60000/m-p/224409#M44606</link>
      <description>&lt;P&gt;HTTP Request has a Timeout message.&amp;nbsp; The default is 60 seconds.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
request = New HTTP Request(
	Url( "https://community.jmp.com/html/assets/community-icons/community-icon-mastering.png" ),
	Method( "GET" ),
	Timeout( 120 )
);
bytes = request &amp;lt;&amp;lt; Send;
img = Open( bytes, jpg );
obj = New Window( "Mastering JMP", img );
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Sep 2019 13:52:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/HTTP-request-get-file-download-Operation-timed-out-after-60000/m-p/224409#M44606</guid>
      <dc:creator>bryan_boone</dc:creator>
      <dc:date>2019-09-03T13:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP request get (file download): Operation timed out after 60000 milliseconds</title>
      <link>https://community.jmp.com/t5/Discussions/HTTP-request-get-file-download-Operation-timed-out-after-60000/m-p/224418#M44607</link>
      <description>&lt;P&gt;Thanks Craig for quick reply,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;your approach generally works and gives similar results,&lt;/P&gt;&lt;P&gt;but in the resulting data tables the data types are different (due to decimal separator , / .).&lt;/P&gt;&lt;P&gt;So your information helps me to find a way for working.&lt;/P&gt;&lt;P&gt;BR, Georg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 14:03:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/HTTP-request-get-file-download-Operation-timed-out-after-60000/m-p/224418#M44607</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2019-09-03T14:03:13Z</dc:date>
    </item>
  </channel>
</rss>

