locked
Invalid column name when column is present RRS feed

  • Question

  • Given this input: 

    [
            {
                "dataChannelId": 8516,
                "measures": [
                    {
                        "dateTime": "2019-01-01T12:00:00",
                    },
                    {
                        "dateTime": "2019-01-02T12:00:00",
                    }
    }]

    And this query: 

    WITH 
    temp AS
    (
        SELECT 
            dataChannelId,
            arrayElement.ArrayValue as element
            FROM GriegInputStream 
            CROSS APPLY GetArrayElements([measures]) AS arrayElement  
    )
    SELECT
        dataChannelId as sensorId, temp.element.dateTime
    INTO
        Sensoroutput
    FROM
        temp

    I Get Invalid column name on dataChannelId, but it is present, same as measures. If i remove this field, the query works, but I want to include the sensorId as well

    Friday, April 26, 2019 7:19 PM

All replies

  • Hi krister.karto,

    To make sure your queries work the way you expect, Stream Analytics needs to know which serialization format you're using for incoming data streams.

    Make sure that you are using JSON as serialization format in Reference data input properties.

    Hope this helps.

    Monday, April 29, 2019 8:15 AM