Skip to main content

Stream UDF Examples

Included here are several Stream UDF examples you might find useful.

A Negative Example: What Not To Do

The following is a typical mistake made by people writing Aerospike Stream UDFs.

This negative example does nothing, because a stream cannot be returned. The stream is a "data flow" upon which you must operate, as shown in the other examples.

-- This does not work.
function my_stream_udf(stream)
return stream
end

The Stream UDF Examples