SPL File types.spl
Interchangeable SPL types. SPL tuple types that can be used to interchange streams between Streams applications implemented in different languages, such as SPL, Python, and Java.
SPL uses structural equivalence for types, which means that types of the same structural composition are considered identical. This means that another toolkit or application need not use these type definitions, and thus can avoid being dependent on this toolkit. For example all these streams definitions are identical:
- stream<rstring jsonString>
- stream<com.teracloud.streams.json.Json>
- stream<com.teracloud.streams.topology.Json>
Content
Types
Json
Tuple type for representing JSON.
Using this schema in an SPL application with com.teracloud.streams.topology.topic::Publish and com.teracloud.streams.topology.topic::Subscribe allows exchange of tuples between SPL, Python, & Java. SPL applications can use the com.teracloud.streams.json toolkit to convert SPL tuples into JSON.
Any stream published by a Python application using schema.CommonSchema.Json will have this schema.
Any stream of type TStream<JSONObject> published by a Java application will have this schema.
Json = rstring jsonString;
String
Tuple type representing string tuples.
Using this schema in an SPL application with com.teracloud.streams.topology.topic::Publish and com.teracloud.streams.topology.topic::Subscribe allows exchange of tuples between SPL, Python, and Java.
Any stream published by a Python application using schema.CommonSchema.String will have this schema.
Any stream of type TStream<String> published by a Java application will have this schema.
String = rstring string;
XML
Tuple type representing XML tuples.
Using this schema in an SPL application with com.teracloud.streams.topology.topic::Publish and com.teracloud.streams.topology.topic::Subscribe allows exchange of tuples between SPL, and Java.
Any stream of type TStream<com.ibm.streams.operator.types.XML> published by a Java application will have this schema.
XML = xml document;
Blob
Tuple type representing binary tuples.
Using this schema in an SPL application with com.teracloud.streams.topology.topic::Publish and com.teracloud.streams.topology.topic::Subscribe allows exchange of tuples between SPL and Java.
Any stream of type TStream<com.ibm.streams.operator.types.Blob> published by a Java application will have this schema.
Blob = blob binary;