@terascope/data-mate / function-configs/interfaces / RecordTransformConfig
Interface: RecordTransformConfig<T>
Extends
Type parameters
Type parameter | Value |
---|---|
T extends Record <string , any > | Record <string , unknown > |
Properties
accepts
readonly
accepts: readonlyFieldType
[]
Can be used in strongly typed contexts to throw early, some types or only compatible with a given operation
Inherited from
FunctionDefinitionConfig
.accepts
Source
data-mate/src/function-configs/interfaces.ts:138
aliases?
optional
readonly
aliases: readonlystring
[]
Optionally specify other known aliases to this function
Inherited from
FunctionDefinitionConfig
.aliases
Source
data-mate/src/function-configs/interfaces.ts:102
argument_schema?
optional
readonly
argument_schema:DataTypeFields
Used for validating and defining the types of the input arguments, please include description field when creating the schema
Inherited from
FunctionDefinitionConfig
.argument_schema
Source
data-mate/src/function-configs/interfaces.ts:126
category
readonly
category:FunctionDefinitionCategory
The category of operation, for documentation purposes
Inherited from
FunctionDefinitionConfig
.category
Source
data-mate/src/function-configs/interfaces.ts:113
create()
readonly
create: (config
) => (value
,index
) =>Record
<string
,unknown
>
Parameters
Parameter | Type |
---|---|
config | FunctionContext <T > |
Returns
Function
Parameters
Parameter | Type |
---|---|
value | Record <string , unknown > |
index | number |
Returns
Record
<string
, unknown
>
Source
data-mate/src/function-configs/interfaces.ts:218
description
readonly
description:string
Used to generate documentation
Inherited from
FunctionDefinitionConfig
.description
Source
data-mate/src/function-configs/interfaces.ts:108
examples?
optional
readonly
examples: readonlyFunctionDefinitionExample
<T
,unknown
>[]
Examples that will be used in the documentation and potentially in the automated tests. FIXME make this non-optional
Inherited from
FunctionDefinitionConfig
.examples
Source
data-mate/src/function-configs/interfaces.ts:120
name
readonly
name:string
The name of the function, this should be considered case-insensitive, since some languages like SQL are case insensitive.
Inherited from
Source
data-mate/src/function-configs/interfaces.ts:97
output_type()
readonly
output_type: (inputConfig
,args
?) =>ReadonlyDataTypeFields
Parameters
Parameter | Type |
---|---|
inputConfig | ReadonlyDataTypeFields |
args ? | T |
Returns
ReadonlyDataTypeFields
Source
data-mate/src/function-configs/interfaces.ts:214
required_arguments?
optional
readonly
required_arguments: readonlystring
[]
Used to determine what of the possible args are required, as DataType configs does not have a mechanism to specify what is required
Inherited from
FunctionDefinitionConfig
.required_arguments
Source
data-mate/src/function-configs/interfaces.ts:132
type
readonly
type:RECORD_TRANSFORM
Type of operation that will be preformed
Overrides
Source
data-mate/src/function-configs/interfaces.ts:213
validate_arguments()?
optional
readonly
validate_arguments: (args
) =>void
Used for additional custom validation of args, called after generic arg validation
Parameters
Parameter | Type |
---|---|
args | T |
Returns
void
Inherited from
FunctionDefinitionConfig
.validate_arguments