IBMStreams / streamsx.json

Toolkit for working with JSON in SPL applications.
http://ibmstreams.github.io/streamsx.json/
Other
3 stars 19 forks source link

Leverage SPL Attribute Type for inputAttribute, targetAttribute, etc. #87

Closed Alex-Cook4 closed 4 years ago

Alex-Cook4 commented 7 years ago

The use of rstrings for the attributes in parameters cannot catch type errors at compile-time.

Migrating to parameters that support the Attribute type would be a better approach (I recognize this didn't exist when these were first developed).

For example, rather than:

        stream<CTIWebMQSchemaWithJSON> CtiJSONToTuple =
            JSONToTuple(CtiSource as inStream)
        {
            param
                jsonStringOutputAttribute : "jsonEvent"; 
                targetAttribute : "ctiEvent"; 
        }

I should be able to do:

        stream<CTIWebMQSchemaWithJSON> CtiJSONToTuple =
            JSONToTuple(CtiSource as inStream)
        {
            param
                jsonStringOutputAttribute : jsonEvent; 
                targetAttribute : ctiEvent; 
        }

I recognize that there are backwards compatibility issues. I'm opening this as I got confused for a while why my attributes weren't getting resolved :)

rnostream commented 4 years ago

Close this now, as it is an old issue asking for some comfort functionality and no questions related to this came up for over 2 years.