bigml-nodered
Version:
BigML bindings for Nodered
205 lines (183 loc) • 7.27 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('source', {
category: 'BigML',
color: '#454957',
defaults: {"item_analysis":{"value":""},"project":{"value":"A project ID. The source will be created inside of\n the project identified by this ID."},"remote":{"value":"A URL pointing to a file containing your data in csv format."},"name":{"value":"Source","required":true},"reify":{"value":false},"synthetic":{"value":""},"source_parser":{"value":""},"file":{"value":"Path to a local file containing your data in csv format."},"disable_datetime":{"value":false},"data":{"value":""},"term_analysis":{"value":""}},
inputs:1,
outputs:1,
inputLabels: 'file',
outputLabels: 'source',
icon: 'icon_generic.png',
label: function() {
return this.name || 'Create Source';
},
labelStyle: function() {
return this.name?"bigml_node_label":"";
},
});
</script>
<script type="text/x-red" data-template-name="source">
<div class="form-row">
<label for="node-input-name">
<i class="icon-tag"></i> Name
</label>
<input type=text id=node-input-name value='Source'>
</div>
<div class="form-row">
<label for="node-input-project">
<i class="icon-tag"></i> Project
</label>
<input type=text id=node-input-project value='A project ID. The source will be created inside of
the project identified by this ID.'>
</div>
<div class="form-row">
<label for="node-input-remote">
<i class="icon-tag"></i> Remote
</label>
<input type=text id=node-input-remote placeholder='https://static.bigml.com/csv/iris.csv' value='A URL pointing to a file containing your data in csv format.'>
</div>
<div class="form-row">
<label for="node-input-file">
<i class="icon-tag"></i> File
</label>
<input type=text id=node-input-file placeholder='/usr/local/iris.csv' value='Path to a local file containing your data in csv format.'>
</div>
<div class="form-row">
<label for="node-input-data">
<i class="icon-tag"></i> Data
</label>
<input type=text id=node-input-data placeholder='a,b,c,d
1,2,3,4
5,6,7,8' >
</div>
<div class="form-row">
<label for="node-input-synthetic">
<i class="icon-tag"></i> Synthetic
</label>
<input type=text id=node-input-synthetic placeholder='{ 'fields': 10, 'rows': 10, 'missing': 0.1 }' >
</div>
<div class="form-row">
<label for="node-input-disable_datetime">
<i class="icon-tag"></i> Disable datetime
</label>
<input type=checkbox id=node-input-disable_datetime value='false'>
</div>
<div class="form-row">
<label for="node-input-item_analysis">
<i class="icon-tag"></i> Item analysis
</label>
<input type=text id=node-input-item_analysis >
</div>
<div class="form-row">
<label for="node-input-source_parser">
<i class="icon-tag"></i> Source parser
</label>
<input type=text id=node-input-source_parser >
</div>
<div class="form-row">
<label for="node-input-term_analysis">
<i class="icon-tag"></i> Term analysis
</label>
<input type=text id=node-input-term_analysis >
</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="source">
<p>This is a BigML Nodered node.</p>
<h3>Details</h3>
<p>This node support all inputs defined in
<a href='https://bigml.com/api/sources' target=blank>BigML REST
API</a>. By default, it expects to receive
a <code>file</code> input (see below for more details) and
it will output the <code>source</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></dd>
<dt>Project
<span class="property-type">:text</span>
</dt>
<dd></dd>
<dt>Remote
<span class="property-type">:text</span>
</dt>
<dd></dd>
<dt>File
<span class="property-type">:text</span>
</dt>
<dd></dd>
<dt>Data
<span class="property-type">:text</span>
</dt>
<dd>Data for inline source creation.</dd>
<dt>Synthetic
<span class="property-type">:text</span>
</dt>
<dd>Set of parameters to generate a synthetic source
presumably for activities such as testing, prototyping and
benchmarking.</dd>
<dt>Disable datetime
<span class="property-type">:boolean</span>
</dt>
<dd>Whether BigML has to generate or not new fields from
existing date-time fields.</dd>
<dt>Item analysis
<span class="property-type">:text</span>
</dt>
<dd>Set of parameters to activate item analysis for the source.</dd>
<dt>Source parser
<span class="property-type">:text</span>
</dt>
<dd>Set of parameters to parse the source.</dd>
<dt>Term analysis
<span class="property-type">:text</span>
</dt>
<dd>Set of parameters to activate text analysis for the source.</dd>
<dt>Reify
<span class="property-type">:boolean</span>
</dt>
<dd></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>source</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>