How-to | Edit Dataiku projects and plugins in Sublime#

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

  • Install the dataiku package.

  • Configure Sublime to connect to an existing Dataiku instance.

  • Pull code from an existing code recipe or plugin into Sublime.

  • Edit the code in Sublime.

  • Save the code back to the code recipe or plugin.

Note

This method can edit existing recipes and plugin files on the Dataiku instance, but cannot create new recipes or files.

Prerequisites#

Install the Dataiku package#

  1. In Sublime Text, open Tools > Command Palette.

  2. Search for install and select Package Control: Install Package.

  3. Search for dataiku and select Dataiku.

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

Connect to a Dataiku instance#

  1. Open the Sublime Text Command Palette.

  2. Search for dataiku and select Dataiku: Configure DSS instances. This opens Dataiku.sublime-settings.

  3. Insert JSON of the format shown below, using the information for your instance and personal API key secret.

  4. Save the settings.

{
  "instances": [
    {
      "name": "My DSS Instance",
      "base_url": "http://localhost:12000",
      "api_key": "SaHZlgrDHi1AfAc14flWt8vIgUyyUy6V",
      "list_of_project_keys_to_exclude": [],
      "list_of_plugin_ids_to_exclude": [],
      "keep_only_code_recipes": true
    }
  ]
}

The parameters available for each Dataiku instance:

  • name. A descriptive name for the Dataiku instance that will be displayed in Sublime Text.

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

  • api_key. The secret for your personal API key.

  • list_of_project_keys_to_exclude. An optional a list of project keys that are excluded when Sublime Text searches for code recipes.

  • keep_only_code_recipes. Determines whether visual recipes are hidden in Sublime Text. It is highly recommended to keep this option set to true.

Edit a Dataiku recipe#

  1. Open the Sublime Text Command Palette.

  2. Search for dataiku and select Dataiku: Edit DSS recipes.

  3. Choose the recipe you want to edit from list.

Changes made in Sublime are made to the recipe in Dataiku when you Save, overwriting any edits made in the meantime on the Dataiku instance.

Screenshot of a Dataiku recipe being edited from Sublime Text.

Edit a Dataiku plugin#

  1. Open the Sublime Text Command Palette.

  2. Search for dataiku and select Dataiku: Edit DSS plugins.

  3. Choose the plugin whose code you want to edit.

  4. Choose the file in the plugin that you want to edit.

Changes made in Sublime are made to the recipe in Dataiku when you Save, overwriting any edits made in the meantime on the Dataiku instance.

Screenshot of a Dataiku plugin being edited from Sublime Text.

What’s next?#

The DataikuSublimeText extension is open sourced; feel free to contribute.