Results of script not showing on Saiku

  • Asked
  • Active
  • Viewed 15295 times
0

Hi Mino, --on the tutorial database--

I have tried to add the dbh_classes using RScript instead of Category type and I am not able to see the results on Saiku. I have saved and executed it and everythinh went fine. I see the results on Calc. But when I open Saiku, it is not there (even though my other calculations appear fine).

entity: tree variable: dbh_classes

> tree$dbh_classes <- ifelse( tree$dbh <
> 10 , 1 ,  ifelse( tree$dbh < 20 , 2 ,
> ifelse( tree$dbh < 30 , 3 , ifelse(
> tree$dbh < 40 , 4, 5 )  ) ) );

Do you know what could be the problem?

Best, Marcelo

1

Accepted answer

Hi Marcelo,

Did you select any variables in the error settings without adding the error r code? then yes, you get an error.

Mino

1

Accepted answer

Hi Marcelo,

to add a new category to your data, you must add a new calculation step type category (as your first picture). The second one, creates a new quantitative variable.

However, in both cases, you should see respectively in Saiku a new Dimension or a new Measure.

After you execute your processing chain from the CALC main page (click the play button in the calculation section of the main page : alt text ,

open saiku, click the refresh button to update the cubes. alt text

and then select your cube to visualize the results.

If it doesn't work, please send me via email your collect backup and your calc workspace so that i can check,

Thank you, Mino

0

Accepted answer

Hi Marcelo,

The calculation step category type is an R script.

What do you mean by "I have tried to add the dbh_classes using RScript instead of Category type " ?

What kind of calculation step did you create instead of Category ?

Or have you tried to refresh the cubes in Saiku ?

Regards,

Mino

0

Accepted answer

Hi Mino,

I know the category type is a R script. However, on Calc, there are two different places to insert the code (Type = R Script and Type = Category).

Like this: alt text

And this: alt text

I have tried these different ways because no matter what I do, I cannot get them to show up in Saiku. Execution goes fine, I see the table with the correct values, but when I open Saiku, it does not display.

I have tried refreshing it. These two variables do no appear.

Thanks. Marcelo

0

Accepted answer

Thanks Mino,

Do I need the Error Script for all variables in order to run the processing chain? I have been getting the message HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException, probably caused by the CalculateErrorTask, everytime I run the chain.

Best, Marcelo

0

Accepted answer

That is it then. I had one of the variables there selected (no idea why).

Problem Found and Solved! Thanks!

0

Accepted answer

Ok good to know Marcelo.

Please, let me know if you have other issues.

Thanks,

Mino

0

Accepted answer

I have some problen i need to help? can i get your email?

0

Accepted answer

This gives a good idea on the use/making measures(quantitative) and dimensions (categories). Now I made in Collect a code list for the (semi)quantitative Tansley abundancy/frequency decimal scale 0 - 9: to be used (pop up in Saiku) as measures but these are still (regarded) categories. Is there a better way than reading/assigning the codes in Collect in a newly created 'number'column? Could there be a way to assign codes (categories) to be treated as numbers (quantities) in Collect/Calc/Saiku. Hope I am clear, Joseph

0

Accepted answer

Hi Joseph,

the more consistent way would be to create a numeric attribute in collect ( you can use calculated attribute if you already have one).

Another way would be to create a qty variable in Calc and assign its value based on the categorical one.

Please let me know if you need more info.

Thank you

Mino

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Menu

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.