diff --git a/README.md b/README.md index 08ab319..e24dff0 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,15 @@ This repo contains the SDK JAR and a pre-configured Java project that uses Gradl - [Configure withOnValueChanged](#configure-withonvaluechanged) - [Configure isCompleteHandler](#configure-iscompletehandler) - [Configure column layouts](#configure-column-layouts) + - [Configuration input context](#configuration-input-context) - [StepConfigurationBuilder sample code](#stepconfigurationbuilder-sample-code) - [Processing your step](#processing-your-step) - [Execute step](#execute-step) - [StepProcessorBuilder sample code](#stepprocessorbuilder-sample-code) - [Cell value style](#cell-value-style) - [isInteractive flag](#isinteractive-flag) - - [Progress bar handling](#progress-bar-handling) + - [Progress bar handling](#progress-bar-handling) + - [Processor input context](#processor-input-context) - [The Cache configuration](#the-cache-configuration) - [Cache scope](#cache-scope) - [Workflow](#workflow) @@ -78,7 +80,8 @@ This repo contains the SDK JAR and a pre-configured Java project that uses Gradl | SDK version | Compatible Data Studio version | New features released | |--------------------------------------------------------------------------------------|--------------------------------|-----------------------| -| 2.2.0 | 2.0.11 (or newer) | | +| 2.3.0 | 2.1.0 (or newer) | +| [2.2.0](https://github.com/experiandataquality/aperture-data-studio-sdk/tree/v2.2.0) | 2.0.11 (or newer) | | | [2.1.1](https://github.com/experiandataquality/aperture-data-studio-sdk/tree/v2.1.1) | 2.0.9 (or newer) | New custom icons added: | | [2.1.0](https://github.com/experiandataquality/aperture-data-studio-sdk/tree/v2.1.0) | 2.0.6 (or newer) || | [2.0.0](https://github.com/experiandataquality/aperture-data-studio-sdk/tree/v2.0.0) | 2.0.0 (or newer) || @@ -117,14 +120,14 @@ This repo contains the SDK JAR and a pre-configured Java project that uses Gradl } dependencies { - compileOnly("com.experian.datastudio:sdkapi:2.2.0") - compileOnly("com.experian.datastudio:sdklib:2.2.0") + compileOnly("com.experian.datastudio:sdkapi:2.3.0") + compileOnly("com.experian.datastudio:sdklib:2.3.0") } ``` If you don't want to use Gradle, you'll have to configure your own Java project to generate a compatible JAR artifact: - Create a new Java project or open an existing one. - - Download and install the [sdkapi.jar](https://raw.githubusercontent.com/experiandataquality/aperture-data-studio-sdk/github-maven-repository/maven/com/experian/datastudio/sdkapi/2.2.0/sdkapi-2.2.0.jar) file. + - Download and install the [sdkapi.jar](https://raw.githubusercontent.com/experiandataquality/aperture-data-studio-sdk/github-maven-repository/maven/com/experian/datastudio/sdkapi/2.3.0/sdkapi-2.3.0.jar) file. If using Maven, modify `pom.xml` to add the SDK GitHub repository: @@ -159,13 +162,13 @@ This repo contains the SDK JAR and a pre-configured Java project that uses Gradl com.experian.datastudio sdkapi - 2.2.0 + 2.3.0 provided com.experian.datastudio sdklib - 2.2.0 + 2.3.0 @@ -267,6 +270,7 @@ Please take note that PROCESS output node cannot connect to DATA input node. .withNodes(stepNodeBuilder -> stepNodeBuilder .addInputNode(inputNodeBuilder -> inputNodeBuilder .withId(INPUT_ID) + .withLabel("Name (required)") .withType(NodeType.PROCESS) .build()) .addOutputNode(outputNodeBuilder -> outputNodeBuilder @@ -339,15 +343,16 @@ For example, to add a column chooser to the step: ##### asCustomChooser -| Method | Description | -|-------------------------|-----------------------------------------------------| -| asCustomChooser | Set an input column from a custom drop-down list | -| withAllowValuesProvider | Set the custom list for selection | -| withAllowSearch | Set whether there's a field search | -| withAllowSelectAll() | Set whether you can select all fields | -| withIsRequired() | Set whether the field is mandatory | -| withMultipleSelect() | Set whether multiple fields can be selected | -| build | Build the step property | +| Method | Description | +|-------------------------------|---------------------------------------------------------------| +| asCustomChooser | Set an input column from a custom drop-down list | +| withAllowValuesProvider | Set the custom list for selection | +| withAllowChooserItemsProvider | Set the custom list with display name and value for selection | +| withAllowSearch | Set whether there's a field search | +| withAllowSelectAll() | Set whether you can select all fields | +| withIsRequired() | Set whether the field is mandatory | +| withMultipleSelect() | Set whether multiple fields can be selected | +| build | Build the step property | #### Configure withOnValueChanged Since version 2.2.0, on-value-changed handler is added to all the step property types. The on-value-changed handler allows a step property to update another step property's value, when its own value is updated. @@ -468,7 +473,15 @@ Column layouts represent column(s) that will be displayed in the step. For examp .build()) ``` - +#### Configuration input context +ConfigurationInputContext is an instance that used to return metadata input columns. + +| Method | Description | +|-----------------|-------------------------------| +| getColumns | Get all input node columns | +| getColumnById | Get input node column by id | +| getColumnsByTag | Get input node columns by tag | + #### StepConfigurationBuilder sample code ``` java @@ -633,6 +646,16 @@ public StepProcessor createProcessor(final StepProcessorBuilder processorBuilder ``` Please take note that `progressChanged()` must not be called inside `outputColumnManager.onValue()`. +#### Processor input context +ProcessorInputContext is an instance that used to return metadata input columns. + +| Method | Description | +|-----------------|-------------------------------| +| getColumns | Get all input node columns | +| getColumnById | Get input node column by id | +| getColumnsByTag | Get input node columns by tag | +| getRowCount | Get row count | + ### The Cache configuration The cache object allows a custom step to cache its results, for later reuse. Each cache object is created and referenced by a particular name. It is useful for storing responses from slow services between instances of custom steps.