operatorin the drop-down menu from the
add newbutton in the top-left corner.
operatorstab in the main menu.
operatorssection of the workspace's side panel, in a similar fashion to adding datasets to a workspace. After adding a UDO to a workspace, it will appear in the list of operators in the workspace and can be used just like any built-in operator, as in the image below.
editbutton on the UDO side panel. An image of the UDO editor, with several numbered areas to be discussed next, is shown below.
.zipfiles by clicking the
exportbutton, saving all of the UDO's information in the exported file. By clicking
importand selecting such a
.zipfile, the contents of the file will be loaded into the currently opened UDO. Alternatively, a UDO can be imported directly in the main menu by dragging and dropping a
.zipfile, just as with
.zipfile. The downloaded file can be directly imported into Einblick.
output model typemenu is unavailable for operators with type
UDF.) In most cases, the
UDFoperator type is used for operators which perform operations on individual rows (e.g. adding a new column based on the value of each row of another column) while the
UDAoperator type is used for operators which perform operations over entire columns at a time (e.g. clustering operators).
publishremoves the draft status of the operator and makes the operator available for use in workspaces. If the operator had previously been published, this changes all instances of the operator (e.g. in workspaces) to use the latest specification.
inputsection, you can specify datasets to use as inputs into the operator. The number and name of these inputs will correspond to the specified
operator specificationcode tab (discussed in more detail later.) The available datasets to use here will be those added to the
datasetssection of the UDO panel in the main menu.
inputsection allow you to choose attribute and parameter settings for testing your UDO. The inputs that appear here will correspond to the
ValueInputDescriptionsections of the
operator specificationcode, and will be visually controlled by the corresponding sections of the
InputUIsection. These will also be discussed in detail further down.
visualizationtab, the generated Vega or Vega-Lite visualization will appear here. Otherwise, a tabular representation of the data will appear here.
operator specification(JSON): defines the inputs and parameters of the operator
requirements(Python): a list of required Python packages
model definition(Python): definition of the trained model for trained UDOs
on_open(Python): code to run upon operator initialization
on_batch(Python): code to run upon receiving a new batch of data
on_close(Python): code to run upon finishing execution
on_reset(Python): code to run upon execution resets
visualization(Vega or Vega-Lite): the Vega or Vega-Lite specification
filters(JSON): defines filters for customizing user interactions with visualizations
automloperator, allows us to build models on prior data and predict values on new data. Trained UDOs can be useful if, for example, you want to use a custom machine learning model during your analysis.
model definitiontab is available on the Model Definition page.
output model typeof the UDO is set, running the UDO, instead of returning a dataframe or visualization as output, will return a trained model. This model will be returned in the form of an executor, as with the
automloperator. This is shown in the image below.
on_batchtab. A quick summary of the four tabs is given below.
on_open: code for initializing variables for the BATCH, CLOSE, and RESET events
on_batch: code to run for each batch
on_close: code specifying behavior after all batches have been run
on_reset: code specifying behavior upon the RESET event
dfs) keyword. To access any custom parameters or selected attributes in the operator's menus, you will need to use the
paramskeywords. See Keywords for more details.
visualizationtab, the visual output of a UDO will be the corresponding visualization. The type of specification (Vega or Vega-Lite) is automatically inferred. To see what kinds of visualizations are possible and begin creating new visualizations, see the example specifications in the Vega Example Gallery and Vega-Lite Example Gallery.
paramskeywords. See Keywords for more details.
datafield of the specification. Therefore, in most cases, the
datafield can be left blank (or nearly blank in the case of Vega-Lite specifications) as below:
datafield. Any additional data points will be insert after the automatically included data.
$schemavalue in your specification, dependent on whether you are using Vega or Vega-Lite:
filterstab is used to specify filters for the visualization. For example, this allows selecting specific groups of data points just by selecting a single point belonging to that group.
filtersarray indicating the class of points to group together. For example, the following code groups together all points sharing the same value of
x. If this were used in a scatterplot UDO, then upon clicking a point, all points sharing the same value of
xas the selected point would also be selected.
on_batch) and in the visualization tab. They are described below.
dfs[i]) [Python only]
pythonoperator, the dataframe inputs of a UDO can be accessed with the
dfis used when there is only one input dataframe, while
dfs[i]is used when there are multiple.
on_batch) returns a new dataframe, produced by adding a column of zeros to the input dataframe.
Scorecolumn from the second dataframe by 100 and adding it to the first dataframe.
params) [Python, Vega/Vega-Lite]
target). Each of these keys will map to a list (or array) of selected attribute names.
GDP per capita, and
Social supportof the input dataset have been selected.
attributeskeyword object is as follows:
paramskeyword is available for any custom parameters. It is an object mapping parameter names to values. For example, given the following inputs:
paramsare available in Python and Vega/Vega-Lite tabs.
container_widthare available in the
visualizationtab. They are useful for setting the visualization's size to fit the operator's dimensions.