Skip to main content

@terascope/data-mate / adapters/teal-frame-adapter / TealFrameAdapterOptions

Interface: TealFrameAdapterOptions<T>

Defined in: data-mate/src/adapters/teal-frame-adapter/index.ts:16

Type Parameters​

Type Parameter
T extends Record<string, any>

Properties​

PropertyTypeDescriptionDefined in
args?TFunction arguments, bound once at registration. As with dataFrameAdapter's static arguments, they are constant for the whole query, so create() is called once and its closure becomes the UDF body. An argument whose value comes from each row goes in rowArgs instead.data-mate/src/adapters/teal-frame-adapter/index.ts:28
database?stringDatabase to register on. Defaults to the process-wide one.data-mate/src/adapters/teal-frame-adapter/index.ts:37
fieldstringThe column the function applies to.data-mate/src/adapters/teal-frame-adapter/index.ts:18
inputConfigDataTypeFieldAndChildrenThe column's field config at this step.data-mate/src/adapters/teal-frame-adapter/index.ts:20
preferSql?booleanUse the function's sql definition when it has one. Defaults to true. Setting it to false forces the UDF path, so tests can compare the two paths, benchmarks can time both, and a faulty SQL definition can be bypassed without a new release.data-mate/src/adapters/teal-frame-adapter/index.ts:44
rowArgs?{ readonly [K in string | number | symbol]?: string }Arguments read from each row, as SQL expressions ({ delimiter: '"delim"' }), like dataFrameAdapter's args: (rowIndex) => .... Each row's arguments are validated and given to create(), so the function always runs as a UDF. The output type comes from args alone. Not supported by functions that change the field type (cast).data-mate/src/adapters/teal-frame-adapter/index.ts:35