recordDataToRecord

Converts the binary errorRecord value to a RECORD datatype value, based on the schema of the specified source stream.

Syntax

recordDataToRecord (string sourceStreamName, binary errorRecord)

Parameters

sourceStreamName is a string that provides the name of the stream from which the error record originated. To allow type checking of the return type, it must be an actual name, not a variable that carries the name. If this argument does not point to an existing stream, recordDataToRecord returns a NULL after setting an error flag to indicate that a bad argument has been specified.

errorRecord is a binary that provides the record that triggered the error. This should always be the errorRecord field of the error stream.
Note: Passing any arbitrary binary string or a mismatching schema (stream) name results in undefined behavior ranging from garbage in the record to crashing the server. The arguments to this built-in must be the sourceStreamName and errorRecord fields of the same error stream.