Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

Multiple input tables for REST query

508UQ4VT41 gravatar image
Question by JensD  (18) | Aug 30, 2016 at 06:07 AM spssibmcloudpredictive-modeling

Is it possible to make a POST scoring request against the Bluemix Predictive Analytics service with more than one input table? The examples are just using one table.

Using: https://palblyp.pmservice.ibmcloud.com/pm/v1/score/contextID?accesskey=key with the following payload:

 {
     "tablename": "music",
     "header": ["userid", "category", "description", "likes", "name", "about"],
     "data": []
 }, {
     "tablename": "likes",
     "header": ["userid", "place_type", "location_zip", "location_longitude", "about", "location_country", "location_city", "location_state", "category", "description", "name", "likes", "location_street", "location_latitude"],
     "data": []
 }

I am getting an error telling me that the input table 'likes' is missing. When I wrap the payload in '[..]', I'm getting a HTTP 500 with:

 javax.servlet.ServletException: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of com.ibm.spss.blackbox.score.resource.InputData out of START_ARRAY token
  at [Source: com.ibm.ws.webcontainer.srt.SRTInputStream@3bb8224c&#59; line: 1, column: 1]<br>

The deployed stream is working with SPSS and the provided WebServices API. Is there a way to call a model which needs more than one input table? Is there more than just the slightly leaking documentation from: https://console.ng.bluemix.net/docs/services/PredictiveModeling/index-gentopic1.html#pm_service_api_batch_flow?

Thanks you very much!

jens

Deltawi

People who like this

  1
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

2 answers

  • Sort: 
270002UN9N gravatar image
Accepted answer

Answer by Rodney Vin (87) | Aug 30, 2016 at 08:03 PM

Sorry, @JensD. PA in Bluemix currently does not support multiple tables in Realtime Scoring "/score" interface. you can sametime or mail me "fengyl@cn.ibm.com". I'll bring the topic to management.

Comment

People who like this

  0   Show 3   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
508UQ4VT41 gravatar image JensD (18)   Aug 31, 2016 at 01:33 AM 0
Share

Bad news :( Thanks, I will get in touch with you.

jens

3100014FYX gravatar image Deltawi (8)   Jan 11, 2017 at 12:11 PM 1
Share

Any updates on this subject ? I am facing the same issue..

50KSVEU2B8 gravatar image AdrianaM01 (28) Deltawi (8)   Jul 12, 2017 at 11:17 AM 0
Share

I'm also waiting for some feedback

270003HK4K gravatar image

Answer by PaulHannan (91) | Aug 30, 2016 at 09:16 AM

Through Scoring within SPSS Collaboration and Deployment Services, multiple input tables can be specified via a REST call. Here is the syntax that I have used to submit a REST call for a Scoring Configuration built over an SPSS Modeler stream that contained 2 input tables:

 {
 "id":"Input",
 "requestInputTable":[
 {
 "name":"Responses.txt",
 "requestInputRow":[
 {
 "input":[
 {"value":"001","name":"Customer"},
 {"value":"60","name":"Age"},
 {"value":"M","name":"Gender"},
 {"value":"13000","name":"Income"},
 {"value":"Y","name":"Married"},
 {"value":"Y","name":"Children"},
 {"value":"N","name":"Disney"},
 {"value":"Y","name":"Timeshare"}
 ]
 }
 ]
 },
 {
 "name":"Customers.txt",
 "requestInputRow":[
 {
 "input":[
 {"value":"001","name":"Customer"},
 {"value":"Smith","name":"Name"},
 {"value":"IA","name":"State"}
 ]
 }
 ]
 }
 ],
 "context":[]
 }

Hopefully this example will answer your question.

Paul

Comment

People who like this

  0   Show 2   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
508UQ4VT41 gravatar image JensD (18)   Aug 30, 2016 at 09:58 AM 0
Share

Using this format with the 'plain' SPSS' is working fine. Unfortunately the Bluemix Predictive Analytics Service has its own REST interface which seems not to be compatible with the SPSS Rest interface :(

Formatting the payload as suggested, I am getting a HTTP 500:

 javax.servlet.ServletException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field &quot;id&quot; &#40;Class com.ibm.spss.blackbox.score.resource.InputData&#41;, not marked as ignorable
  at [Source: com.ibm.ws.webcontainer.srt.SRTInputStream@14d0519a&#59; line: 1, column: 9] &#40;through reference chain: com.ibm.spss.blackbox.score.resource.InputData[&quot;id&quot;]&#41;<br>

Have you successfully executed your example against the Predictive Analytics Service? Hopefully I am wrong and just have a typo in my request :)

Jens

270003HK4K gravatar image PaulHannan (91) ♦   Aug 30, 2016 at 10:14 AM 0
Share

No, I haven't executed against Predictive Analytics Service.

Paul

Follow this question

113 people are following this question.

Answers

Answers & comments

Related questions

where is catalog data(.csv), it is not present in predictive modeling bluemix example on github? 3 Answers

Fail to load stream to Bluemix Predictive Modeling services. 5 Answers

Bluemix Predictive Analytics service API with date 3 Answers

SPSS GA Plan 3 Answers

I need help setting up a Model in Modeler to run in BlueMix. 1 Answer

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges