Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Dash webapps in dataiku

The dataiku ecosystem integrates with Shiny and Bokeh, but not Dash. From version 0.0.44, dash-extensions enables easy integrations of Dash apps as webapps in dataiku.

To get started, create a standard webapp. Make sure that the selected code environment (can be configured in the Settings tab) has the following packages installed,

dash==1.18.1
dash-extensions==0.0.44

Replace the content of the HTML tab with

<head>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/thedirtyfew/dash-extensions@0.0.44/snippets/dataiku.js"></script>
</head>

and clear the JS and CSS tabs (unless you the JS/CSS code). Finally, go to the Python tab and replace the content with

import dash
import dash_html_components as html
from dash_extensions.dataiku import setup_dataiku

# Path for storing app configuration (must be writeable).
config_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "config.json")
# Create a small example app.
dash_app = dash.Dash(__name__, **setup_dataiku(app, config_path))
dash_app.layout = html.Div("Hello from Dash!")

After clicking save, you should see the text Hello from Dash! in the preview window (a backend restart might be required). Congratulations! You have created you first Dash app in dataiku.