cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
lala
Level VIII

How to use JMP 17 multithreading to download such URL data?

When doing a Multi HTTP Request using JMP 17, encountering this download no temporary folder no files found,

2023-10-26_16-47-03.png


But it's a discovery download.

2023-10-26_16-49-42.png

3 REPLIES 3
lala
Level VIII

回复: How can such urls be Multi HTTP Request with JMP 17?

How can this special download be merged into a large file normally.

Thanks!

requests = New Multi HTTP Request();
s0 = N Items( urls );
For( j = 1, j <= s0, j++,
rs = New HTTP Request( Method( "GET" ), URL( urls[j] ),Timeout(0.1) );	
	//ts = rs << Send;requests << Add( ts );	
	requests << Add( rs );
);
da = requests << Download( "show progress", "detailed" );//
j=1;s=NItems(da);mm=0;

回复: How can such urls be Multi HTTP Request with JMP 17?

I'm not sure I get what you're asking for, but would re-arranging your looping structure fix this? Here's an example of a similar way to loop through multiple HTTP requests.


Names Default to Here (1);
//Web( "https://vpic.nhtsa.dot.gov/api/" ); //API documentation

vins = {"3FTTW8E3XPRA36592", "5FPYK3F11PB050312"}; //Random small trucks for sale, pulled from internet
year = "2023"; //year for ^

for each ({i}, vins, 
	//make URL
	u = "https://vpic.nhtsa.dot.gov/api/vehicles/decodevinextended/" || i || "?format=json&modelyear=" || year;
	//create and send request; capture results as 's'
	s = New HTTP Request( URL( u ), Method( "GET" ) ) << Send;
	//make results into a data table
	dt = JSON To Data Table( s );
);

/*JMP STATISTICAL DISCOVERY LLC (“JMP”) PERMITS THE USE OF THIS COMPUTER SOFTWARE CODE (“CODE”) ON AN AS-IS BASIS AND AUTHORIZES YOU TO USE THE CODE SUBJECT TO THE TERMS LISTED HEREIN.  BY USING THE CODE, YOU AGREE TO THESE TERMS.  YOUR USE OF THE CODE IS AT YOUR OWN RISK.  JMP MAKES NO REPRESENTATION OR WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRIGEMENT, AND TITLE, WITH RESPECT TO THE CODE.
You may use the Code solely as part of a software product you currently have licensed from JMP, JMP’s parent company SAS Institute Inc. (“SAS”), or one of JMP’s or SAS’s subsidiaries or authorized agents (the “Software”), and not for any other purpose.  The Code is designed to add functionality to the Software but has not necessarily been tested.  Accordingly, JMP makes no representation or warranty that the Code will operate error-free.  JMP is under no obligation to maintain, support, or continue to distribute the Code.
Neither JMP nor its licensors shall be liable to you or any third-party for any general, special, direct, indirect, consequential, incidental, or other damages whatsoever arising out of or related to your use or inability to use the Code, even if JMP has been advised of the possibility of such damages.  Except as otherwise provided above, the Code is governed by the same agreement that governs the Software.  If you do not have an existing agreement with JMP or SAS governing the Software, you may not use the Code.
JMP and all other JMP Statistical Discovery LLC product or service names are registered trademarks or trademarks of JMP Statistical Discovery LLC in the USA and other countries.  ® indicates USA registration.  Other brand and product names are registered trademarks or trademarks of their respective companies.
*/





lala
Level VIII

回复: How can such urls be Multi HTTP Request with JMP 17?

Thanks!

 

This cyclic download method, I also master.

 

I do need to download JMP17's new features concurrently.