Skip to main content

@terascope/data-mate / function-configs/interfaces / RecordTransformConfig

Interface: RecordTransformConfig<T>

Extends

Type parameters

Type parameterValue
T extends Record<string, any>Record<string, unknown>

Properties

accepts

readonly accepts: readonly FieldType[]

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: readonly string[]

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

ParameterType
configFunctionContext<T>

Returns

Function

Parameters
ParameterType
valueRecord<string, unknown>
indexnumber
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: readonly FunctionDefinitionExample<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

FunctionDefinitionConfig.name

Source

data-mate/src/function-configs/interfaces.ts:97


output_type()

readonly output_type: (inputConfig, args?) => ReadonlyDataTypeFields

Parameters

ParameterType
inputConfigReadonlyDataTypeFields
args?T

Returns

ReadonlyDataTypeFields

Source

data-mate/src/function-configs/interfaces.ts:214


required_arguments?

optional readonly required_arguments: readonly string[]

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

FunctionDefinitionConfig.type

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

ParameterType
argsT

Returns

void

Inherited from

FunctionDefinitionConfig.validate_arguments

Source

data-mate/src/function-configs/interfaces.ts:141