pixiedust / pixiedust_incubator

Pixiedust demos and experimental plugins
14 stars 11 forks source link

%%scala directive not found in notebooks in DSX #2

Open gopikris opened 7 years ago

gopikris commented 7 years ago

I pasted the below code in a DSX notebook in one cell and got %%scala not found. Then I separated it out into 3 cells and scala directive error was gone but I got this below error. Can you please help ?

pixiedustRunner.scala:38: error: object cds is not a member of package com.ibm val demo = com.ibm.cds.spark.samples.PixiedustStreamingTwitter ^ one error found

import pixiedust

twitterConsumerKey = "" twitterConsumerSecret = "" twitterAccessToken = "" twitterAccessTokenSecret = "" toneAnalyzerPassword = "" toneAnalyzerUserName = ""

%%scala val demo = com.ibm.cds.spark.samples.PixiedustStreamingTwitter demo.setConfig("twitter4j.oauth.consumerKey",twitterConsumerKey) demo.setConfig("twitter4j.oauth.consumerSecret",twitterConsumerSecret) demo.setConfig("twitter4j.oauth.accessToken",twitterAccessToken) demo.setConfig("twitter4j.oauth.accessTokenSecret",twitterAccessTokenSecret) demo.setConfig("watson.tone.url","https://gateway.watsonplatform.net/tone-analyzer/api") demo.setConfig("watson.tone.password",toneAnalyzerPassword) demo.setConfig("watson.tone.username",toneAnalyzerUserName) demo.setConfig("checkpointDir", System.getProperty("user.home") + "/pixiedust/ssc")

from pixiedust_twitterdemo import *

twitterDemo()

DTAIEB commented 7 years ago

@gopikris before further diagnosing, a few steps I want to make sure you followed when running the notebook

  1. After installing the jar with pixiedust.installPackage api, you need to restart the kernl
  2. Every time you restart a kernel, all cells have to be run again.
  3. Make sure to fill out the credentials. Not sure from above if you left them empty for the sake of this post or not.