cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks app and R shiny

Paddy_chu
New Contributor III

Hello,

I've been testing the Databricks app and have the follow questions:

1. My organization currently uses Catalog Explorer instead of Unity Catalog. I want to develop a Shiny app and was able to run code from the template under New > App. However, this environment doesn't support package installation and doesn't allow conversion of Spark tables from Catalog Explorer to Pandas DataFrames for visualizations. I don't have admin rights to install any packages on the cluster.

Is there a way for the Shiny app to access data from Catalog Explorer?

2. I prefer developing apps on Databricks notebooks, but I haven't been able to run a Shiny app using Python with shiny for python code. Here is the code I've used in my notebook:

 

 
from shiny import ui, render, App

app_ui = ui.page_fluid(
    ui.input_slider("n", "N", 0, 100, 40),
    ui.output_text_verbatim("txt"),
)

def server(input, output, session😞
    @render.text
    def txt():
        return f"n*2 is {input.n() * 2}"

app = App(app_ui, server)
 

The code executed without errors, but the app did not launch. When I write the code in R, an URL path pops up without any issues. However, after the first time generating the R Shiny app, my notebook always gets stuck with the cell constantly showing as "waiting." Using R for Shiny, I can develop the app on a Databricks notebook with data from Catalog Explorer, but I can't deploy it as easily as deploying it on Databricks App, and Databricks App doesn't seem to support R code.

Does anyone know how to use Shiny for Python to develop Shiny app on a Databricks notebook and how to launch the app on Databricks notebook so I can see the output?

 
Appreciate for any solutions.
 
Thanks,

 

0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now