We're excited to announce that we're launching the second installment of Dataiku Product Days Register Now

Webapp R Shiny Help

Solved!
VarunVankineni
Level 1
Webapp R Shiny Help

Hi, I am very new to DSS and I am facing multiple difficulties trying to get a shiny webapp running, would be great if someone could answer/elaborate on the following,

  • Is there any way I can get access to a console while editing the app, the log is pretty much useless and the preview gives very little info (or am I doing something wrong here that I should be editing elsewhere)
  • How do I use code from the library (or global library) in my webapp
  • Any other inputs/experiences on how you would develop a shiny app in dataiku (or is it not recommended)
0 Kudos
1 Solution
SarinaS
Dataiker
Dataiker

Hi @VarunVankineni,

For debugging, you can add print statements in your server code if you want to inspect data, and the print statements will be reflected in the webapp "Log" tab. The full logs are also available on the right-hand sidebar "Logs" selection. Note that you do have to click the "refresh" button to see updated logs if you performed some actions in the UI and then want to see the updated logs as a result of your actions. 

Screen Shot 2021-08-27 at 5.46.46 PM.png

That said, it may be easier to debug at least some of your code in a notebook and then port it over to a webapp after you have it working as expected.  

For using a code file in a webapp, do you mean something like an R project library? If so, you can call R project library code from within a webapp. For example, if I have the following R library file that contains a function:

Screen Shot 2021-08-27 at 5.57.52 PM.png

In my shiny webapp server tab I can import the library like so:

library(dataiku)
dkuSourceLibR("myLibrary.R")


And then call my function within the webapp. You can read more about this here: Sharing R code within a project

However, if I am misunderstanding what type of code file you are looking to use, please let me know. 

Thanks,
Sarina

View solution in original post

4 Replies
CoreyS
Community Manager
Community Manager

Hello @VarunVankineni and welcome to both Dataiku and the Dataiku Community. Since you mentioned that you are very new to Dataiku here are a few resources that you may find helpful, if you haven't accessed them already, while you wait for a more complete response:

  1. Visualization (Dataiku Academy): This includes a Hands-On: Shiny Webapp section
  2. Hands-On: Shiny Webapp (Knowledge Base): This is the Hands-On referenced above

I hope this helps!

Looking for more resources to help you use Dataiku effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as ‘Accepted Solution’ to help others like you!
0 Kudos
VarunVankineni
Level 1
Author

Hi Corey,

I did go through the hands on.

It doesn't showcase how one can use a code file in the library into the shiny webapp. It is also very hard to develop in the webapp without an actual console, which does exist when we are working on code recipes.

Could you help me out with these issues.

0 Kudos
SarinaS
Dataiker
Dataiker

Hi @VarunVankineni,

For debugging, you can add print statements in your server code if you want to inspect data, and the print statements will be reflected in the webapp "Log" tab. The full logs are also available on the right-hand sidebar "Logs" selection. Note that you do have to click the "refresh" button to see updated logs if you performed some actions in the UI and then want to see the updated logs as a result of your actions. 

Screen Shot 2021-08-27 at 5.46.46 PM.png

That said, it may be easier to debug at least some of your code in a notebook and then port it over to a webapp after you have it working as expected.  

For using a code file in a webapp, do you mean something like an R project library? If so, you can call R project library code from within a webapp. For example, if I have the following R library file that contains a function:

Screen Shot 2021-08-27 at 5.57.52 PM.png

In my shiny webapp server tab I can import the library like so:

library(dataiku)
dkuSourceLibR("myLibrary.R")


And then call my function within the webapp. You can read more about this here: Sharing R code within a project

However, if I am misunderstanding what type of code file you are looking to use, please let me know. 

Thanks,
Sarina

View solution in original post

VarunVankineni
Level 1
Author

I think you answered my questions accurately. This is the kind of file I wanted to import into the webapp. 

Thanks!

0 Kudos
A banner prompting to get Dataiku DSS