NodeInputReader
The NodeInputReader
class provides methods to retrieve node input in various formats, such as Files, Tables, and Data objects.
Methods
inputAsFile(): File
inputAsFile(): File
Gets the node input as a File object.
inputAsDataFrame(page: Integer, limit: Integer): Table
inputAsDataFrame(page: Integer, limit: Integer): Table
Gets the node input as a Table object that can be queried and read. This method is useful for working with data in a tabular format.
Parameters
page
(Integer): The page number for data pagination.limit
(Integer): The maximum number of rows to retrieve.
inputAsDataObject(): JsonNode
inputAsDataObject(): JsonNode
Gets the node input as a Data object that can be read.
inputAsFileIndex(index: Integer): File
inputAsFileIndex(index: Integer): File
Gets the node input as a File object by an index. This is used when there are multiple inputs.
Parameters
index
(Integer): The index of the input.
inputAsDataFrameIndex(index: Integer, page: Integer, limit: Integer): Table
inputAsDataFrameIndex(index: Integer, page: Integer, limit: Integer): Table
Gets the node input as a Table object by an index and allows for pagination when working with large datasets. This is used when there are multiple inputs.
Parameters
index
(Integer): The index of the input.page
(Integer): The page number for data pagination.limit
(Integer): The maximum number of rows to retrieve.
inputAsDataFrameTotalRows(): Integer
inputAsDataFrameTotalRows(): Integer
Gets the number of parts the DataFrame has.
inputAsDataFrameByIndexTotalRows(index: Integer): Integer
inputAsDataFrameByIndexTotalRows(index: Integer): Integer
Gets the number of parts the DataFrame has by DataFrame index.
Parameters
index
(Integer): The index of the DataFrame.
inputAsDataFrame(): Table
(Deprecated)
inputAsDataFrame(): Table
(Deprecated)Gets the table object. This method is deprecated and should not be used. Instead, use inputAsDataFrameIndex()
with page and limit for more controlled data retrieval.
Examples
Example: Get Columns Max Value
Description: This script retrieves the maximum value from the 6th column of an input table.
Use Case: Useful when you need to find the highest value in a specific column of a dataset.
Example: New Table Filtered
Description: This script filters a table based on a condition, creating a new table with filtered data.
Use Case: Ideal for data preprocessing and filtering based on specific criteria.