Custom Params Dataiku Plugin Recipe
![Rosa](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar11.png)
Hello,
I am developing a plugin recipe, using python. I want the user to be able to give some input, which I allow in the form of params.
One of the params I want to have is a datetime, which is not a default param type in dataiku plugin.
Therefore, I wish to build a custom param.
Preferbly, I would like to develop a cusotm parm which I can then use in all the components of my plugin. Is anyone aware how I would develop a custom param type?
As a temporary solution I have developed a param template. This is refered to in my recipe.json file as following:
"paramsTemplate" : "form_default.html", "paramsModule" : "form_default"
The form_default.html file then looks as following
<div ng-controller="FormController" style="margin: 10px 0px;"> <div> <label for="startDateTime">Start DateTime</label> <input name="startDateTime" type="datetime-local" step="0.001" ng-model="config.startDateTime" /> </div> <div>
And the form_defaul.json file:
var app = angular.module('form_default', []); app.controller('FormController', function($scope) { $scope.checkResult = {}; $scope.check = function() {}; $scope.check(); });
The issue I face here, is when I reload the plugin page in dataiku, the param is not saved. This is however saved when I use a type like (for example) text.
In conclusion I have two questions:
- How can I define custom param type in DataIku Plugin?
- How can I ensure that the param, defined in a paramsTemplate is saved?