Forum Discussion
Eventstream custom SQL code not working due to an invalid input name
Eventstream has a custom SQL code capability. This capability always fails due to an "invalid input name", most likely due to a hyphen in the stream name. The problem is that there's no option to rename the stream, and it includes a hyphen by default. I assume since it's a new feature that this is a bug. I'd recommend to either allow the user to change the default stream name, or fix the SQL code capability so that it handles hyphens in input/output names.
Hi PaxDataEngineer ,
Looks like you havent added the destination. In this case, Lakehouse1 or
wrapping stream names with special characters (like hyphens/underscore) in square brackets is causing the error.
Try using the stream name without hyphen and then validate and check.
Please refer-
From Clicks to Code: SQL Operator under Fabric Eventstream (Preview)
Hope this helps!
9 Replies
- datacoffeeMost Valuable Professional
Hi PaxDataEngineer
Currently the SQL code editor is in preview and we can expect some challenges with the service.
With that said, I cannot recreate the issue on my development environment.
If I create a custom SQL job to my stream and do not alter it at all, it works OOTB.
Though, I can create the error message if I'm using non-streaming SQL functions and names.
You might already know this, the SQL code behind the Eventstream is the same as the Azure Streaming analytics and is a subset of functionality - you can read the entire docs here: Azure Stream Analytics & Fabric Eventstream Query Language Reference - Stream Analytics Query | Microsoft LearnI hope you can make it work in your environment
- PaxDataEngineerNew Member
So it does say "no problem detected" when just using the simple "SELECT * INTO [Output] FROM..." but after saving it you can see the error specifying that the stream name is invalid.
- datacoffeeMost Valuable Professional
Ah yes. I see that.
I guess you are right with the small bug.
My guess it is due to the underscore in your stream name.
Let's see what the Microsoft team here in the community says 😀
- v-sdhruvCommunity Support
Hi PaxDataEngineer ,
Just wanted to check if you got a chance to review the suggestion provided and whether that helped you resolve your issue?
Thank you bytecascade for your input.
Hope that helped! - v-sdhruvCommunity Support
Hi PaxDataEngineer ,
Looks like you havent added the destination. In this case, Lakehouse1 or
wrapping stream names with special characters (like hyphens/underscore) in square brackets is causing the error.
Try using the stream name without hyphen and then validate and check.
Please refer-
From Clicks to Code: SQL Operator under Fabric Eventstream (Preview)
Hope this helps! - v-sdhruvCommunity Support
Hi PaxDataEngineer ,
Just wanted to check if the response has addressed your query?
If you have any query, feel to reach out.
Thank you! - v-sdhruvCommunity Support
Hi @PaxDataEngineer ,
Just wanted to check if the response has addressed your query?
If you have any query, feel to reach out.
Thank you! - bytecascadeMicrosoft Employee
Hi PaxDataEngineer,
Eventstream name that contains underscores is currently not compatible with SQL operator.
Right now Eventstream throws an authoring error if Eventstream name has underscores and a SQL operator is added to the topology.
Please try creating a new Eventstream without underscores in the name, or rename the existing Eventstream artifact with no underscores in the name to resolves this issue. - WavesonNew Member
It's not the hyphen - it's the underscore.
Eventstream artifact names that include underscores (_) or dot (.) are not compatible with the SQL operator. For the best experience, please create a new Eventstream without using underscores or dots in the artifact name.
https://learn.microsoft.com/en-us/fabric/real-time-intelligence/event-streams/process-events-using-sql-code-editor