Stream keyword


The stream keyword allows you to:

  • include an existing stream in a new stream definition.
  • merge two or more streams.

The syntax is:

stream <hash>

where is the DataSift hash that identifies the stream to be included.

note icon

Note that if you use the stream keyword to include a definition this ignores any tags specified in the definition being included. To include tags you should use the tags keyword.


  1. Take an existing stream and add an extra rule:

    twitter.text contains "election"
        AND language.tag == "en"
        AND stream "670c493f73a29a280162aa2b688fa956"

  2. Merge three streams into one master stream and then add tags to identify which objects come from which streams.

    tag "red"   {stream "f0596f03644177b8bf5b59708a08bfe8"}
        tag "white" {stream "6740288c3c3d02984d1dc624d77e198f"}
        tag "blue"  {stream "922aad7bec1836c83ede051b153d3d09"}
        return {
            stream "f0596f03644177b8bf5b59708a08bfe8" or
            stream "6740288c3c3d02984d1dc624d77e198f" or
            stream "922aad7bec1836c83ede051b153d3d09"