Professional Documents
Culture Documents
D
D
ModelerScriptingAutomation.pdf
Upload 5 Documents to Download
Upload 5 presentations, research papers, legal documents, or other documents to
download for free.
Upload NowOR
Get Unlimited Downloads with a Free Scribd Trial!
Free for 30 days
then $8.99/month
13,461 people
browsing Scribd right now
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
Podcasts
Sheet Music
Snapshots
Documents
0 ratings
0% found this document useful (0 votes)
3 views
376 pages
ModelerScriptingAutomation.pdf
Uploaded byZULLY YINETH TAMAYO MARTINEZ
Description:Full description
Save
Save ModelerScriptingAutomation.pdf For Later
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Embed
Share
Print
RELATED TITLES
Carousel Next
Tivoli Scripting
Tivoli Scripting
Javascript
Javascript
LESSION_6_SQL
LESSION_6_SQL
qtp-faq
qtp-faq
Factor to Consider When Selecting Web Programming Languages
Factor to Consider When Selecting Web Programming Languages
SPSS Programming and Data Management 3rd Edition
SPSS Programming and Data Management 3rd Edition
FDM Class
FDM Class
Discoverer Point in Time
Discoverer Point in Time
SAP Table Names
SAP Table Names
Mcx050 Home Real
Mcx050 Home Real
SAT 200 Scripting API and Command Interface
SAT 200 Scripting API and Command Interface
Simscriptiii Prog
Simscriptiii Prog
LuaDoc
LuaDoc : Documentation Generator Tool for the Lua language
sara garcia resume
sara garcia resume
Modul Java Android
Modul Java Android
Kssrtmkt6.E-tech.my LP Scratch3
Kssrtmkt6.E-tech.my LP Scratch3
CME-Guide
CME-Guide
Smartform Form Layout creation TCode - SMARTFORMS.pdf
Smartform Form Layout creation TCode - SMARTFORMS.pdf
java script analysis redo
java script analysis redo
Quant Share
Quant Share
Download now
Jump to Page
1
You are on page 1of 376
Note
Before you use this information and the product it supports, read the information
in “Notices” on page 359.
Product Information
This edition applies to version 18, release 1, modification 1 of IBM SPSS Modeler
and to all subsequent releases andmodifications until otherwise indicated in new
editions.
Contents
Chapter1. Scripting and the ScriptingLanguage..............1
Scripting overview............1Types of Scripts.............1Stream
Scripts..............1Stream script example: Training a neural net...3 Jython code
size limits..........3Standalone Scripts............4Standalone script example:
Saving and loading amodel...............4Standalone script example: Generating a
FeatureSelection model............4SuperNode Scripts............5SuperNode Script
Example........6Looping and conditional execution in streams...6Looping in
streams...........7Conditional execution in streams......10Executing and
interrupting scripts.......11Find and Replace............12
Chapter2. The Scripting Language..15
Scripting language overview.........15Python and Jython............15Python
Scripting.............16Operations.............16Lists................16Strings....
...........17Remarks..............18Statement
Syntax...........18Identifiers..............19Blocks of Code............19Passing
Arguments to a Script.......19Examples..............20Mathematical
Methods.........21Using Non-ASCII characters........22Object-Oriented
Programming........23Defining a Class............23Creating a Class
Instance.........24Adding Attributes to a Class Instance....24Defining Class
Attributes and Methods....24Hidden Variables...........24Inheritance.............25
Chapter3. Scripting in IBM SPSSModeler..............27
Types of scripts.............27Streams, SuperNode streams, and
diagrams...27Streams...............27SuperNode
streams...........27Diagrams..............27Executing a stream............27The
scripting context...........28Referencing existing nodes.........28Finding
nodes............29Setting properties...........29Creating nodes and modifying
streams.....30Creating nodes............30Linking and unlinking
nodes.......31Importing, replacing, and deleting nodes...32Traversing through nodes
in a stream....33Clearing, or removing, items........33Getting information about
nodes.......33
Chapter4. The Scripting API.....37
Introduction to the Scripting API.......37Example 1: searching for nodes using a
custom filter37Example 2: allowing users to obtain directory or fileinformation
based on their privileges......37Metadata: Information about data.......38Accessing
Generated Objects........40Handling Errors.............42Stream, Session, and
SuperNode Parameters...42Global Values..............46Working with Multiple
Streams: Standalone Scripts47
Chapter5. Scripting tips.......49
Modifying stream execution.........49Looping through nodes..........49Accessing
Objects in the IBM SPSS Collaborationand Deployment Services
Repository......49Generating an encoded password.......52Script
checking.............52Scripting from the command line.......52Compatibility with
previous releases......52Accessing Stream Execution Results......53Table content
model..........53XML Content Model..........55 JSON Content Model..........56Column
statistics content model and pairwisestatistics content model.........58
Chapter6. Command Line Arguments61
Invoking the Software...........61Using command line arguments.......61System
arguments...........62Parameter arguments..........63Server connection
arguments.......64IBM SPSS Collaboration and DeploymentServices Repository
Connection Arguments...65IBM SPSS Analytic Server connection arguments65Combining
Multiple Arguments......65
Chapter7. Properties Reference....67
Properties reference overview........67Syntax for properties..........67Node and
stream property examples.....68Node properties overview.........69Common Node
Properties........69
iii
senthil
Javascript
Javascript
UPLOADED BY
api-19917699
qtp-faq
qtp-faq
UPLOADED BY
Ramu Palanki
Factor to Consider When Selecting Web Programming Languages
Factor to Consider When Selecting Web Programming Languages
UPLOADED BY
dnlkaba
SPSS Programming and Data Management 3rd Edition
SPSS Programming and Data Management 3rd Edition
UPLOADED BY
cookfilter
FDM Class
FDM Class
UPLOADED BY
studindian
Discoverer Point in Time
Discoverer Point in Time
UPLOADED BY
Nigel Karslake
SAP Table Names
SAP Table Names
UPLOADED BY
abha1718
Mcx050 Home Real
Mcx050 Home Real
UPLOADED BY
Joseph
SAT 200 Scripting API and Command Interface
SAT 200 Scripting API and Command Interface
UPLOADED BY
Paulo Torrens
LuaDoc
LuaDoc : Documentation Generator Tool for the Lua language
UPLOADED BY
Banibrata Dutta
sara garcia resume
sara garcia resume
UPLOADED BY
api-262508879
Modul Java Android
Modul Java Android
UPLOADED BY
Dedi Gunawan
Kssrtmkt6.E-tech.my LP Scratch3
Kssrtmkt6.E-tech.my LP Scratch3
UPLOADED BY
文新邓
CME-Guide
CME-Guide
UPLOADED BY
khalis@hotmail.com
Smartform Form Layout creation TCode - SMARTFORMS.pdf
Smartform Form Layout creation TCode - SMARTFORMS.pdf
UPLOADED BY
Dipesh
java script analysis redo
java script analysis redo
UPLOADED BY
api-306977332
Quant Share
Quant Share
UPLOADED BY
elisa
MineSight and Python
MineSight and Python
UPLOADED BY
Ricardo Contreras B
kruskall
kruskall
UPLOADED BY
bayu
274178644-Python-Programming-101.pdf
274178644-Python-Programming-101.pdf
UPLOADED BY
Art Dollosa
crash-2018-08-22_19.34.32-server
crash-2018-08-22_19.34.32-server
UPLOADED BY
Anonymous VQN5d7
10. P630 demo
10. P630 demo
UPLOADED BY
Ilaiyaa Raja
archivetempreport.docx
archivetempreport.docx
UPLOADED BY
Muhammad Imran
SPSS Chronbach Alpha
SPSS Chronbach Alpha
UPLOADED BY
McYheong IG
ACS800 Control Panel Operation
ACS800 Control Panel Operation
UPLOADED BY
Sohail Ahmed
Syntax Reference IBM SPSS 26.pdf
Syntax Reference IBM SPSS 26.pdf
UPLOADED BY
suci lukfyana
spss terus
spss terus
UPLOADED BY
Nasr Pooya
PHP MySQL Exercise
PHP MySQL Exercise
UPLOADED BY
Iandra Bedin
4551 Fall 2020 Course Outline Detailed Sept 29 (2)
4551 Fall 2020 Course Outline Detailed Sept 29 (2)
UPLOADED BY
GFGSHS
Basic Servo Control
Basic Servo Control
UPLOADED BY
Vinicius
xpan_3d_plus
xpan_3d_plus
UPLOADED BY
Andrei ru
K-Means Clustering_ Numerical Example
K-Means Clustering_ Numerical Example
UPLOADED BY
Γιαννης Σκλαβος
br_PRT7011L_Datasheet.pdf
br_PRT7011L_Datasheet.pdf
UPLOADED BY
Zúl Híkám
1.Operations Research.ppt
1.Operations Research.ppt
UPLOADED BY
bbhoee
Sample Data Architect Modeling Resume
Sample Data Architect Modeling Resume
UPLOADED BY
Samule Paul
CISCO WEBEX
CISCO WEBEX
UPLOADED BY
ravikkota
Discovering Chess Openings Building Opening Skil
Discovering Chess Openings Building Opening Skil
UPLOADED BY
asd
LeDucAnh_GCS18856-đã chuyển đổi.pdf
LeDucAnh_GCS18856-đã chuyển đổi.pdf
UPLOADED BY
Lê Đức Anh
sim5360_atc_en_v0.19
sim5360_atc_en_v0.19
UPLOADED BY
Thanks Marisa
LG 50PC5D Repair Manual
LG 50PC5D Repair Manual
UPLOADED BY
Jon Hutty
Chip-and-PIN Card Hack Analysis
Chip-and-PIN Card Hack Analysis
UPLOADED BY
Andy Greenberg
EEE1001_exp5_combinational circuit
EEE1001_exp5_combinational circuit
UPLOADED BY
Sachin Devarakonda
UNSELECTIVE INDEXES
UNSELECTIVE INDEXES
UPLOADED BY
JP Vijaykumar
GSAS Manual
GSAS Manual
UPLOADED BY
Prince Oma
BCA 3 Sem Regular & Reappear December 2010 17.02.2011
BCA 3 Sem Regular & Reappear December 2010 17.02.2011
UPLOADED BY
I am running the whole on my local computer, there is no server. – Laca Jun 26 '18
at 13:53
I am not sure, if the whole setup is not correct. if i simply enter a print 'test',
than it gives the same error. – Laca Jun 26 '18 at 14:16
Hi @Laca, your setup should work, since I use the same. Can you append a screenshot
of the inside of the extension transform node (syntax tab only)? Also could you try
the code I edited into my answer? This should return the input dataframe and print
"Hello World" to the Console Output Tab. – pandayo Jun 27 '18 at 6:39
Hi Panadayo! Thanks for your feedback. I added the whole setup to the original
question. – Laca Jun 27 '18 at 8:34
I also tried the example with the Hello world, but it is the same error.
rajeevv_6
SUPERVISORY GUIDANCE ON MODEL RISK MANAGEMENT - April 4, 2011
SUPERVISORY GUIDANCE ON MODEL RISK MANAGEMENT - April 4, 2011
UPLOADED BY
subramanianganapathy
CV Europass 20170424 Eliashvili en.doc
CV Europass 20170424 Eliashvili en.doc
UPLOADED BY
Dimitri Kenchoshvili
DNS ID Hacking Presentation
DNS ID Hacking Presentation
UPLOADED BY
sanle
Technology Enhanced Learning Environments_Healey
Technology Enhanced Learning Environments_Healey
UPLOADED BY
Penny
Contacts Log
Contacts Log
UPLOADED BY
John Racioppo
Competition Project - Algo Pricing
Competition Project - Algo Pricing
UPLOADED BY
The Unbounded
01-Software_Installation.pptx
01-Software_Installation.pptx
UPLOADED BY
Hernan Ponce
20412B-ENU-TrainerHandbook
20412B-ENU-TrainerHandbook
UPLOADED BY
Collapse section
Rate
Useful
0%
0% found this document useful, Mark this document as useful
Not useful
0%
0% found this document not useful, Mark this document as not useful
Collapse section
Share
Share on Facebook, opens a new window
Facebook
Share on Twitter, opens a new window
Twitter
Share on LinkedIn, opens a new window
LinkedIn
Copy Link to clipboard
Copy Link
Share with Email, opens mail client
Email
rry?
One-click set up
paypal
$0.00 due until Jan 27.
Cancel anytime.
Cancel anytime.
Start Uploading
Your membership begins with 1 month free. Starting January 27, 2021 you will be
charged $8.99/month (plus tax) until
Close Dialog
To access this document, upload one of yours, or subscribe with a 30 day free
trial. Cancel anytime.
13,461 people
browsing Scribd right now
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
Podcasts
Sheet Music
Snapshots
Documents
0 ratings
0% found this document useful (0 votes)
3 views
376 pages
ModelerScriptingAutomation.pdf
Uploaded byZULLY YINETH TAMAYO MARTINEZ
Description:Full description
Save
Save ModelerScriptingAutomation.pdf For Later
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Embed
Share
Print
RELATED TITLES
Carousel Next
Tivoli Scripting
Tivoli Scripting
Javascript
Javascript
LESSION_6_SQL
LESSION_6_SQL
qtp-faq
qtp-faq
Factor to Consider When Selecting Web Programming Languages
Factor to Consider When Selecting Web Programming Languages
SPSS Programming and Data Management 3rd Edition
SPSS Programming and Data Management 3rd Edition
FDM Class
FDM Class
Discoverer Point in Time
Discoverer Point in Time
SAP Table Names
SAP Table Names
Mcx050 Home Real
Mcx050 Home Real
SAT 200 Scripting API and Command Interface
SAT 200 Scripting API and Command Interface
Simscriptiii Prog
Simscriptiii Prog
LuaDoc
LuaDoc : Documentation Generator Tool for the Lua language
sara garcia resume
sara garcia resume
Modul Java Android
Modul Java Android
Kssrtmkt6.E-tech.my LP Scratch3
Kssrtmkt6.E-tech.my LP Scratch3
CME-Guide
CME-Guide
Smartform Form Layout creation TCode - SMARTFORMS.pdf
Smartform Form Layout creation TCode - SMARTFORMS.pdf
java script analysis redo
java script analysis redo
Quant Share
Quant Share
Download now
Jump to Page
1
You are on page 1of 376
Note
Before you use this information and the product it supports, read the information
in “Notices” on page 359.
Product Information
This edition applies to version 18, release 1, modification 1 of IBM SPSS Modeler
and to all subsequent releases andmodifications until otherwise indicated in new
editions.
Contents
Chapter1. Scripting and the ScriptingLanguage..............1
Scripting overview............1Types of Scripts.............1Stream
Scripts..............1Stream script example: Training a neural net...3 Jython code
size limits..........3Standalone Scripts............4Standalone script example:
Saving and loading amodel...............4Standalone script example: Generating a
FeatureSelection model............4SuperNode Scripts............5SuperNode Script
Example........6Looping and conditional execution in streams...6Looping in
streams...........7Conditional execution in streams......10Executing and
interrupting scripts.......11Find and Replace............12
Chapter2. The Scripting Language..15
Scripting language overview.........15Python and Jython............15Python
Scripting.............16Operations.............16Lists................16Strings....
...........17Remarks..............18Statement
Syntax...........18Identifiers..............19Blocks of Code............19Passing
Arguments to a Script.......19Examples..............20Mathematical
Methods.........21Using Non-ASCII characters........22Object-Oriented
Programming........23Defining a Class............23Creating a Class
Instance.........24Adding Attributes to a Class Instance....24Defining Class
Attributes and Methods....24Hidden Variables...........24Inheritance.............25
Chapter3. Scripting in IBM SPSSModeler..............27
Types of scripts.............27Streams, SuperNode streams, and
diagrams...27Streams...............27SuperNode
streams...........27Diagrams..............27Executing a stream............27The
scripting context...........28Referencing existing nodes.........28Finding
nodes............29Setting properties...........29Creating nodes and modifying
streams.....30Creating nodes............30Linking and unlinking
nodes.......31Importing, replacing, and deleting nodes...32Traversing through nodes
in a stream....33Clearing, or removing, items........33Getting information about
nodes.......33
Chapter4. The Scripting API.....37
Introduction to the Scripting API.......37Example 1: searching for nodes using a
custom filter37Example 2: allowing users to obtain directory or fileinformation
based on their privileges......37Metadata: Information about data.......38Accessing
Generated Objects........40Handling Errors.............42Stream, Session, and
SuperNode Parameters...42Global Values..............46Working with Multiple
Streams: Standalone Scripts47
Chapter5. Scripting tips.......49
Modifying stream execution.........49Looping through nodes..........49Accessing
Objects in the IBM SPSS Collaborationand Deployment Services
Repository......49Generating an encoded password.......52Script
checking.............52Scripting from the command line.......52Compatibility with
previous releases......52Accessing Stream Execution Results......53Table content
model..........53XML Content Model..........55 JSON Content Model..........56Column
statistics content model and pairwisestatistics content model.........58
Chapter6. Command Line Arguments61
Invoking the Software...........61Using command line arguments.......61System
arguments...........62Parameter arguments..........63Server connection
arguments.......64IBM SPSS Collaboration and DeploymentServices Repository
Connection Arguments...65IBM SPSS Analytic Server connection arguments65Combining
Multiple Arguments......65
Chapter7. Properties Reference....67
Properties reference overview........67Syntax for properties..........67Node and
stream property examples.....68Node properties overview.........69Common Node
Properties........69
iii
senthil
Javascript
Javascript
UPLOADED BY
Ramu Palanki
Factor to Consider When Selecting Web Programming Languages
Factor to Consider When Selecting Web Programming Languages
UPLOADED BY
dnlkaba
SPSS Programming and Data Management 3rd Edition
SPSS Programming and Data Management 3rd Edition
UPLOADED BY
cookfilter
FDM Class
FDM Class
UPLOADED BY
studindian
Discoverer Point in Time
Discoverer Point in Time
UPLOADED BY
Nigel Karslake
SAP Table Names
SAP Table Names
UPLOADED BY
abha1718
Mcx050 Home Real
Mcx050 Home Real
UPLOADED BY
Joseph
SAT 200 Scripting API and Command Interface
SAT 200 Scripting API and Command Interface
UPLOADED BY
Paulo Torrens
LuaDoc
LuaDoc : Documentation Generator Tool for the Lua language
UPLOADED BY
Banibrata Dutta
sara garcia resume
sara garcia resume
UPLOADED BY
api-262508879
Modul Java Android
Modul Java Android
UPLOADED BY
Dedi Gunawan
Kssrtmkt6.E-tech.my LP Scratch3
Kssrtmkt6.E-tech.my LP Scratch3
UPLOADED BY
文新邓
CME-Guide
CME-Guide
UPLOADED BY
khalis@hotmail.com
Smartform Form Layout creation TCode - SMARTFORMS.pdf
Smartform Form Layout creation TCode - SMARTFORMS.pdf
UPLOADED BY
Dipesh
java script analysis redo
java script analysis redo
UPLOADED BY
api-306977332
Quant Share
Quant Share
UPLOADED BY
elisa
MineSight and Python
MineSight and Python
UPLOADED BY
Ricardo Contreras B
kruskall
kruskall
UPLOADED BY
bayu
274178644-Python-Programming-101.pdf
274178644-Python-Programming-101.pdf
UPLOADED BY
Art Dollosa
crash-2018-08-22_19.34.32-server
crash-2018-08-22_19.34.32-server
UPLOADED BY
Anonymous VQN5d7
10. P630 demo
10. P630 demo
UPLOADED BY
Ilaiyaa Raja
archivetempreport.docx
archivetempreport.docx
UPLOADED BY
Muhammad Imran
SPSS Chronbach Alpha
SPSS Chronbach Alpha
UPLOADED BY
McYheong IG
ACS800 Control Panel Operation
ACS800 Control Panel Operation
UPLOADED BY
Sohail Ahmed
Syntax Reference IBM SPSS 26.pdf
Syntax Reference IBM SPSS 26.pdf
UPLOADED BY
suci lukfyana
spss terus
spss terus
UPLOADED BY
Nasr Pooya
PHP MySQL Exercise
PHP MySQL Exercise
UPLOADED BY
Iandra Bedin
4551 Fall 2020 Course Outline Detailed Sept 29 (2)
4551 Fall 2020 Course Outline Detailed Sept 29 (2)
UPLOADED BY
GFGSHS
Basic Servo Control
Basic Servo Control
UPLOADED BY
Vinicius
xpan_3d_plus
xpan_3d_plus
UPLOADED BY
Andrei ru
K-Means Clustering_ Numerical Example
K-Means Clustering_ Numerical Example
UPLOADED BY
Γιαννης Σκλαβος
br_PRT7011L_Datasheet.pdf
br_PRT7011L_Datasheet.pdf
UPLOADED BY
Zúl Híkám
1.Operations Research.ppt
1.Operations Research.ppt
UPLOADED BY
PiuShan Prasanga Perera
Copy of Jaya Resume 2
Copy of Jaya Resume 2
UPLOADED BY
bbhoee
Sample Data Architect Modeling Resume
Sample Data Architect Modeling Resume
UPLOADED BY
Samule Paul
CISCO WEBEX
CISCO WEBEX
UPLOADED BY
ravikkota
Discovering Chess Openings Building Opening Skil
Discovering Chess Openings Building Opening Skil
UPLOADED BY
asd
LeDucAnh_GCS18856-đã chuyển đổi.pdf
LeDucAnh_GCS18856-đã chuyển đổi.pdf
UPLOADED BY
Lê Đức Anh
sim5360_atc_en_v0.19
sim5360_atc_en_v0.19
UPLOADED BY
Thanks Marisa
LG 50PC5D Repair Manual
LG 50PC5D Repair Manual
UPLOADED BY
Jon Hutty
Chip-and-PIN Card Hack Analysis
Chip-and-PIN Card Hack Analysis
UPLOADED BY
Andy Greenberg
EEE1001_exp5_combinational circuit
EEE1001_exp5_combinational circuit
UPLOADED BY
Sachin Devarakonda
UNSELECTIVE INDEXES
UNSELECTIVE INDEXES
UPLOADED BY
JP Vijaykumar
GSAS Manual
GSAS Manual
UPLOADED BY
Prince Oma
BCA 3 Sem Regular & Reappear December 2010 17.02.2011
BCA 3 Sem Regular & Reappear December 2010 17.02.2011
UPLOADED BY
rajeevv_6
SUPERVISORY GUIDANCE ON MODEL RISK MANAGEMENT - April 4, 2011
SUPERVISORY GUIDANCE ON MODEL RISK MANAGEMENT - April 4, 2011
UPLOADED BY
subramanianganapathy
CV Europass 20170424 Eliashvili en.doc
CV Europass 20170424 Eliashvili en.doc
UPLOADED BY
Dimitri Kenchoshvili
DNS ID Hacking Presentation
DNS ID Hacking Presentation
UPLOADED BY
sanle
Technology Enhanced Learning Environments_Healey
Technology Enhanced Learning Environments_Healey
UPLOADED BY
Penny
Contacts Log
Contacts Log
UPLOADED BY
John Racioppo
Competition Project - Algo Pricing
Competition Project - Algo Pricing
UPLOADED BY
The Unbounded
01-Software_Installation.pptx
01-Software_Installation.pptx
UPLOADED BY
Hernan Ponce
20412B-ENU-TrainerHandbook
20412B-ENU-TrainerHandbook
UPLOADED BY
import json
ascontext=None
if len(sys.argv) > 1 and sys.argv[1] == "-test":
import os
sc = SparkContext('local')
sqlCtx = SQLContext(sc)
# get an input dataframe with sample data by looking in working directory for
file DRUG1N.json
wd = os.getcwd()
df = sqlCtx.load("file://"+wd+"/DRUG1N.json","json").repartition(4)
# specify predictors and target
fields = ["Na", "K", "Age"]
suffix = "_NORM"
modelpath = "/tmp/DrugDM.json"
else:The dummy data is created as exected. (see at the bottom) I try to access and
modify the data with python using the example that i found on IBM website
import spss.pyspark.runtime
from pyspark.sql.types import *
cxt = spss.pyspark.runtime.getContext()
if cxt.isComputeDataModelOnly():
_schema = cxt.getSparkInputSchema()
cxt.setSparkOutputSchema(_schema)
else: I am running the whole on my local computer, there is no server. – Laca
Jun 26 '18 at 13:53
I am not sure, if the whole setup is not correct. if i simply enter a print 'test',
than it gives the same error. – Laca Jun 26 '18 at 14:16
Hi @Laca, your setup should work, since I use the same. Can you append a screenshot
of the inside of the extension transform node (syntax tab only)? Also could you try
the code I edited into my answer? This should return the input dataframe and print
"Hello World" to the Console Output Tab. – pandayo Jun 27 '18 at 6:39
Hi Panadayo! Thanks for your feedback. I added the whole setup to the original
question. – Laca Jun 27 '18 at 8:34
I also tried the example with the Hello world, but it is the same error.
_structType = cxt.getSparkInputSchema()
df = cxt.getSparkInputData()
_newDF = df.sample(False, 0.01, 1)
cxt.setSparkOutputData(_newDF)
When i try to press the preview to get see the result i got 2 errors: - Can not get
data model: null - No record was received
import spss.pyspark.runtime
ascontext = spss.pyspark.runtime.getContext()
sc = ascontext.getSparkContext()
df = ascontext.getSparkInputData()
fields = map(lambda x: x.strip(),"%%fields%%".split(","))
suffix = '%%suffix%%'
if ascontext:e
SAP Table Names
SAP Table Names
Mcx050 Home Real
Mcx050 Home Real
SAT 200 Scripting API and Command Interface
SAT 200 Scripting API and Command Interface
Simscriptiii Prog
Simscriptiii Prog
Click to expand Related Titles
Collapse section
Rate
Useful
0%
0% found this document useful, Mark this document as useful
Not useful
0%
0% found this document not useful, Mark this document as not useful
Collapse section
Share
Share on Facebook, opens a new window
Facebook
Share on Twitter, opens a new window
Twitter
Share on LinkedIn, opens a new window
LinkedIn
Copy Link to clipboard
Copy Link
Share with Email, opens mail client
Email
you cancel. You can cancel your membership script_details =
("normalize_score.py",0.5)
import json
ascontext=None
if len(sys.argv) > 1 and sys.argv[1] == "-test":
import os
sc = SparkContext('local')
sqlCtx = SQLContext(sc)The dummy data is created as exected. (see at the
bottom) I try to access and modify the data with python using the example that i
found on IBM website
import spss.pyspark.runtime
from pyspark.sql.types import *
cxt = spss.pyspark.runtime.getContext()
if cxt.isComputeDataModelOnly():
_schema = cxt.getSparkInputSchema()
cxt.setSparkOutputSchema(_schema)
else:
_structType = cxt.getSparkInputSchema()
df = cxt.getSparkInputData()
_newDF = df.sample(False, 0.01, 1)
cxt.setSparkOutputData(_newDF)
When i try to press the preview to get see the result i got 2 errors: - Can not get
data model: null - No record was received
# get an input dataframe with sample data by looking in working directory for
file DRUG1N.json
wd = os.getcwd()
df = sqlCtx.load("file://"+wd+"/DRUG1N.json","json").repartition(4)
# specify predictors and target
fields = ["Na", "K", "Age"]
suffix = "_NORM"
modelpath = "/tmp/DrugDM.json"
else:
import spss.pyspark.runtime
ascontext = spss.pyspark.runtime.getContext()
sc = ascontext.getSparkContext()
df = ascontext.getSparkInputData()
fields = map(lambda x: x.strip(),"%%fields%%".split(","))
suffix = '%%suffix%%'
if ascontext:at any time from the “Account” area of your Account Settings.