bigml-nodered
Version:
BigML bindings for Nodered
287 lines (257 loc) • 10.7 kB
HTML
<style>
.bigml_node_label { fill: white; }
#palette-BigML .palette_node { color: white; }
#red-ui-palette-BigML .red-ui-palette-label { color: white; }
</style>
<script type="text/javascript">
RED.nodes.registerType('dataset', {
category: 'BigML',
color: '#454957',
defaults: {"objective_field":{"value":""},"origin":{"value":""},"refresh_field_types":{"value":false},"tags":{"value":""},"name":{"value":"dataset","required":true},"reify":{"value":false},"term_limit":{"value":0},"excluded_fields":{"value":""},"shared_hash":{"value":""},"fields":{"value":""},"refresh_objective":{"value":false},"json_filter":{"value":""},"category":{"value":0},"size":{"value":0},"webhook":{"value":""},"lisp_filter":{"value":""},"description":{"value":""},"input_fields":{"value":""}},
inputs:1,
outputs:1,
inputLabels: 'source',
outputLabels: 'dataset',
icon: 'icon_dataset.png',
label: function() {
return this.name || 'Dataset';
},
labelStyle: function() {
return this.name?"bigml_node_label":"";
},
});
</script>
<script type="text/x-red" data-template-name="dataset">
<div class="form-row">
<label for="node-input-name">
<i class="icon-tag"></i> Name
</label>
<input type=text id=node-input-name value='dataset'>
</div>
<div class="form-row">
<label for="node-input-description">
<i class="icon-tag"></i> Description
</label>
<input type=text id=node-input-description >
</div>
<div class="form-row">
<label for="node-input-excluded_fields">
<i class="icon-tag"></i> Excluded fields
</label>
<input type=text id=node-input-excluded_fields placeholder='["000000", "000002"]' >
</div>
<div class="form-row">
<label for="node-input-fields">
<i class="icon-tag"></i> Fields
</label>
<input type=text id=node-input-fields placeholder='{ "000000": { "name": "length_1", "label": "Length 1", "description": "Length 1 is sepal length"}, "000002": {"name": "length_2"}}' >
</div>
<div class="form-row">
<label for="node-input-input_fields">
<i class="icon-tag"></i> Input fields
</label>
<input type=text id=node-input-input_fields placeholder='["000000", "000003"]' >
</div>
<div class="form-row">
<label for="node-input-json_filter">
<i class="icon-tag"></i> Json filter
</label>
<input type=text id=node-input-json_filter placeholder='[">", 3.14, ["field", "000002"]]' >
</div>
<div class="form-row">
<label for="node-input-lisp_filter">
<i class="icon-tag"></i> Lisp filter
</label>
<input type=text id=node-input-lisp_filter placeholder='(> 3.14 (field 2))' >
</div>
<div class="form-row">
<label for="node-input-objective_field">
<i class="icon-tag"></i> Objective field
</label>
<input type=text id=node-input-objective_field placeholder='{"id": "000003"}' >
</div>
<div class="form-row">
<label for="node-input-origin">
<i class="icon-tag"></i> Origin
</label>
<input type=text id=node-input-origin placeholder='script/5b9ab8474e172785e3000003' >
</div>
<div class="form-row">
<label for="node-input-refresh_field_types">
<i class="icon-tag"></i> Refresh field types
</label>
<input type=checkbox id=node-input-refresh_field_types value='false'>
</div>
<div class="form-row">
<label for="node-input-refresh_objective">
<i class="icon-tag"></i> Refresh objective
</label>
<input type=checkbox id=node-input-refresh_objective value='false'>
</div>
<div class="form-row">
<label for="node-input-refresh_objective">
<i class="icon-tag"></i> Refresh objective
</label>
<input type=checkbox id=node-input-refresh_objective value='false'>
</div>
<div class="form-row">
<label for="node-input-shared_hash">
<i class="icon-tag"></i> Shared hash
</label>
<input type=text id=node-input-shared_hash placeholder='kpY46mNuNVReITw0Z1mAqoQ9ySW' >
</div>
<div class="form-row">
<label for="node-input-size">
<i class="icon-tag"></i> Size
</label>
<input type=number id=node-input-size value='0'>
</div>
<div class="form-row">
<label for="node-input-term_limit">
<i class="icon-tag"></i> Term limit
</label>
<input type=number id=node-input-term_limit value='0'>
</div>
<div class="form-row">
<label for="node-input-tags">
<i class="icon-tag"></i> Tags
</label>
<input type=text id=node-input-tags placeholder='["A tag", "Another Tag"]' >
</div>
<div class="form-row">
<label for="node-input-category">
<i class="icon-tag"></i> Category
</label>
<select id=node-input-category value='0'><option value=5>5</option> <option value=Healthcare>Healthcare</option></select>
</div>
<div class="form-row">
<label for="node-input-webhook">
<i class="icon-tag"></i> Webhook
</label>
<input type=text id=node-input-webhook >
</div>
<div class="form-row">
<label for="node-input-reify">
<i class="icon-tag"></i> Reify
</label>
<input type=checkbox id=node-input-reify value='false'>
</div>
</script>
<script type="text/html" data-help-name="dataset">
<p>Create BigML Dataset.</p>
<h3>Details</h3>
<p>This node support all inputs defined in
<a href='https://bigml.com/api/datasets' target=blank>BigML REST
API</a>. By default, it expects to receive
a <code>source</code> input (see below for more details) and
it will output the <code>dataset</code> field of the created
resource.
</p>
<p>However, you can override default inputs and outputs by defining
the node port label so they match the desired input or output as
specified below.</p>
<p>Only when the node is used with the <code>reify</code> option
enabled, it will actually hit BigML and do its work there. This
generally means some resources will be created and sent through as
node outputs.</p>
<p>When the node is used with the <code>reify</code>option disabled,
it will generate WhizzML code and send it through to the next node
in the flow without hitting BigML. All WhizzML code created by this
node (and others) when not in <code>reify</code> mode is accumulated
and executed as a single WhizzML script by the first
downstream <code>reified</code> node.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>Name
<span class="property-type">:text</span>
</dt>
<dd>A name for this node.</dd>
<dt>Description
<span class="property-type">:text</span>
</dt>
<dd></dd>
<dt>Excluded fields
<span class="property-type">:text</span>
</dt>
<dd>Specifies the fields that won't be included in the dataset.</dd>
<dt>Fields
<span class="property-type">:text</span>
</dt>
<dd>Updates the names, labels, and descriptions of the fields in the dataset.</dd>
<dt>Input fields
<span class="property-type">:text</span>
</dt>
<dd>Specifies the fields to be included in the dataset.</dd>
<dt>Json filter
<span class="property-type">:text</span>
</dt>
<dd>A JSON list representing a filter over the rows in the datasource.</dd>
<dt>Lisp filter
<span class="property-type">:text</span>
</dt>
<dd>A string representing a Lisp s-expression to filter rows from the datasource.</dd>
<dt>Objective field
<span class="property-type">:text</span>
</dt>
<dd>Specifies the default objective field.</dd>
<dt>Origin
<span class="property-type">:text</span>
</dt>
<dd>The script/id of the gallery script to be cloned. The price of the script must be 0 to be cloned via API.</dd>
<dt>Refresh field types
<span class="property-type">:boolean</span>
</dt>
<dd>Specifies whether field types need to recomputed or not.</dd>
<dt>Refresh objective
<span class="property-type">:boolean</span>
</dt>
<dd>Specifies whether the default objective field of the dataset needs to be recomputed or not.</dd>
<dt>Refresh objective
<span class="property-type">:boolean</span>
</dt>
<dd>Specifies whether preferred field flags need to recomputed or not.</dd>
<dt>Shared hash
<span class="property-type">:text</span>
</dt>
<dd>The shared hash of the shared script to be cloned. The price of the script must be 0 to be cloned via API.</dd>
<dt>Size
<span class="property-type">:number</span>
</dt>
<dd>The number of bytes from the source that you want to use.</dd>
<dt>Term limit
<span class="property-type">:number</span>
</dt>
<dd>The maximum total number of terms to be used in text analysis.</dd>
<dt>Tags
<span class="property-type">:text</span>
</dt>
<dd>A list of tags to identify the resource.</dd>
<dt>Category
<span class="property-type">:select</span>
</dt>
<dd></dd>
<dt>Webhook
<span class="property-type">:text</span>
</dt>
<dd>A webhook url and an optional secret phrase.</dd>
<dt>Reify
<span class="property-type">:boolean</span>
</dt>
<dd>Execute the WhizzML code generated at this (and upstream) node(s). You need to enable this option if you want to get a result from your flow that you can pass to a non-BigML node.</dd>
</dl>
<h3>Outputs</h3>
<ol class="node-ports">
<dl class="message-properties">
<dt>payload <span class="property-type">string or
JSON</span></dt>
<dd>the <code>dataset</code> of the created
BigML entity.</dd>
<dt>whizzml <span class="property-type">string</dt>
<dd>(only for <code>reified</code> nodes) the
generated WhizzML code which is fed into the next
node.
<dt>wzStack <span class="property-type">object</dt>
<dd>(only for <code>reified</code> nodes) private.
</dl>
</ol>
</script>