Hi everybody,
If i have 967000 in a data source. I'd like to know if ther's a way to select data in the data source by 200 rows. And when i finished with 200 rows of data, to execute again the Stream and select 200 another data until the end of the data in the data source ?
Thank you
Answer by nauvillain (269) | Nov 11 at 11:34 AM
Hi, you'll need to write a Python script (in Tools - Stream Properties - Execution) and write a loop that loops through your data, and run the stream each time.
For instance you can run the following script where you have 1 select node that selects the data you want:
stream = modeler.script.stream()
for i in range(0,20):
selectnode=stream.findByID("id7KNUCCBYP1S")
selectnode.setPropertyValue("condition", "@INDEX >" + str(2*i) + " and @INDEX < " + str(2*i+2) )
stream.runAll([])
In this example, the loop is run 20 times, and selects rows with index 0 and 1, then 2 and 3, and so on.
You have to replace the node's ID with your own Select Node's ID (found in the annotations tab of the select node).
Make sure you indent the code under the loop (the 3 lines below the 'for' loop)
Thank you for your answer. @INDEX is a key word or is the name of a field?
Optimization - Stream take a long time to execute 0 Answers
If statement 1 Answer
How do I interpret a CHAID decision tree using SPSS Modeler? 1 Answer
Cannot subscribe SPSS Modeler Trial 1 Answer