The streaming job failed: Stream Analytics-job has validation errors: The input yourinputalias used in the query is not defined.

A. Wesemann 1 Reputation point
2022-12-01T08:28:17.91+00:00

Good morning.
I have created an Azure IOT hub that receives telemetry data from the KPN things IOT portal (It's Dutch). I then added the ASA job and specified input (coming from the IOT hub) and the output (Blob Storage/ADLS Gen2).

The name of the input is "input" and the name of the output is "output". Query looks like this in the ASA job:

SELECT  
    *  
INTO  
    [output]  
FROM  
    [input]  

I can query the input and it results in telemetry data when I run the query "SELECT * from input".
When I test the input and the output it results in a succesful test.

But, when I start the ASA job it fails with the statement as provided in the subject. To find this error description I opened the activitity log and selected the json option. Full json statement below:

{  
    "channels": "Operation",  
    "correlationId": "b22100a8-113c-4ede-8523-df392afa00c6",  
    "description": "Stream Analytics job status changed for last user action [Start job 'ASA-KPN-JOB'].",  
    "eventDataId": "59b31267-4d16-4559-a69f-0eed6ce33483",  
    "eventName": {  
        "value": "Start job 'ASA-KPN-JOB'",  
        "localizedValue": "Start job 'ASA-KPN-JOB'"  
    },  
    "category": {  
        "value": "Administrative",  
        "localizedValue": "Administratief"  
    },  
    "eventTimestamp": "2022-12-01T07:25:21.7580294Z",  
    "id": "/subscriptions/cf8c7747-d3c6-4e2e-b7e1-60e30b9a42cc/resourceGroups/KPN-IOT-FINAL/providers/Microsoft.StreamAnalytics/streamingjobs/ASA-KPN-JOB/events/59b31267-4d16-4559-a69f-0eed6ce33483/ticks/638054763217580294",  
    "level": "Error",  
    "operationId": "7885f6cc-b99a-4a5e-be5d-cfbaaa287099",  
    "operationName": {  
        "value": "Start job 'ASA-KPN-JOB'",  
        "localizedValue": "Start job 'ASA-KPN-JOB'"  
    },  
    "resourceGroupName": "KPN-IOT-FINAL",  
    "resourceProviderName": {  
        "value": "Microsoft.StreamAnalytics",  
        "localizedValue": "Microsoft.StreamAnalytics"  
    },  
    "resourceType": {  
        "value": "Microsoft.StreamAnalytics/streamingjobs",  
        "localizedValue": "Microsoft.StreamAnalytics/streamingjobs"  
    },  
    "resourceId": "/subscriptions/cf8c7747-d3c6-4e2e-b7e1-60e30b9a42cc/resourceGroups/KPN-IOT-FINAL/providers/Microsoft.StreamAnalytics/streamingjobs/ASA-KPN-JOB",  
    "status": {  
        "value": "Failed",  
        "localizedValue": "Mislukt"  
    },  
    "subStatus": {  
        "value": "",  
        "localizedValue": ""  
    },  
    "submissionTimestamp": "2022-12-01T07:25:40.0727215Z",  
    "subscriptionId": "cf8c7747-d3c6-4e2e-b7e1-60e30b9a42cc",  
    "tenantId": "",  
    "properties": {  
        "JobFailedMessage": "The streaming job failed: Er zijn validatiefouten opgetreden voor de Stream Analytics-taak: De invoer yourinputalias die is gebruikt in de query is niet opgegeven.",  
        "JobId": "b22100a8-113c-4ede-8523-df392afa00c6",  
        "JobRunId": "c0543ef2-be43-4f66-b7b9-bb80f77e4ed9",  
        "JobRunCreatedDateTime": "2022-12-01 07:25:09Z",  
        "JobRunLastUpdateDateTime": "2022-12-01 07:25:21Z",  
        "JobRunStatus": "Failed",  
        "JobContentVersion": "1.12",  
        "JobFrameworkVersion": ""  
    },  
    "relatedEvents": []  

Please note that I use the Dutch localized version of Azure, therefore some translations may be incorrect.

Hope someone can help me out here! I am struggling now for more than a week and re-configured everything for more than 10 times now.
KR
Alex

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,115 questions
Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
330 questions
{count} votes

1 answer

Sort by: Most helpful
  1. chbeier 1,866 Reputation points
    2022-12-01T16:57:00.007+00:00

    Hey @A. Wesemann ,

    Can you double check and share your query? Based on the error message in the actvity log, it looks like your job tries to use "YourInputAlias" in the query.
    I can at least reproduce the error by using "YourInputAlias" in my query without having an input with that name defined. Don't forget to hit the save query button in the Query dialog after entering or editing your query.

    ----------

    If your question was solved, please do "accept answer" and feel free to upvote. If you need additional information, please provide more details.

    1 person found this answer helpful.