How to Edit Dataiku Recipes and Plugins in PyCharm

Goal

Though Jupyter notebooks are integrated into the Dataiku interface, some developers favor PyCharm as an IDE. From within PyCharm, you can:

  • Install the dataiku plugin

  • Configure PyCharm to connect to an existing Dataiku instance

  • Pull code from an existing code recipe or plugin into PyCharm

  • Edit the code in PyCharm

  • Locally run and debug code recipes, and then

  • Save the code back to the code recipe or plugin

Note

This method can edit existing recipes and plugins on the Dataiku instance, but cannot create new recipes or plugins. It is possible to create new files and folders within existing plugins.

Prerequisites

  • Familiarity with code recipes or plugins in Dataiku.

Technical Requirements

Install the Dataiku Plugin

  • In PyCharm, open Preferences and navigate to the Plugins page.

  • Search for dataiku in the marketplace and select Dataiku DSS.

The Dataiku plugin provides commands for connecting to a Dataiku instance and editing recipes on the instance.

Connect to a Dataiku Instance

  • In PyCharm, open Preferences and navigate to the Dataiku DSS Settings page.

../../../_images/pycharm-prefs-dkusettings.png

The “Synchronization” settings specify whether PyCharm should automatically synchronize changes between the local code base and the code on the Dataiku DSS instance.

The “Instances” settings specify the information necessary to connect to a Dataiku DSS instance. The parameters available for each Dataiku instance are:

  • Display name. A descriptive name for the Dataiku instance that will be displayed in PyCharm

  • Base URL. The base URL of the Dataiku instance, without / at the end

  • Personal API key secret. The secret for your personal API key

Save the settings.

Edit a Dataiku Recipe or Plugin

Choose File > Open Dataiku DSS. In the dialog, select:

  • DSS instance. Choose from among the instances you’ve set up on the Dataiku DSS Settings page of PyCharm’s Preferences.

  • Type. Choose whether you want to edit a Recipe or Plugin.

If you choose Recipe, then on the Next screen, you will choose the Project and Python Recipe within that Project you want to edit. If you want to locally run and debug the recipe, you may need to click Install to install the Dataiku client library in your virtual environment. If you are using a stock or Conda installation, you must do it manually by following the dataiku package installation instructions.

If you choose Plugin, those on the Next screen, you will choose the Plugin within that instance you want to edit. The entire folder structure of the Plugin is downloaded locally to PyCharm.

Changes made in PyCharm are synchronized to Dataiku automatically on the schedule defined in the Dataiku DSS Settings page, or when you explicitly choose File > Synchronize with DSS.

../../../_images/pycharm-edit-plugin.png