Search code examples
azurepowerbiazure-stream-analytics

How to make the aliases with Uppercase in stream analytics?


I have a simple json message that I receive from a device, this is the message

{"A":3,"B":4}

Also I set a query in the stream job to send the data to Power Bi, this is the query

SELECT * INTO [OutputBI] FROM [Input] WHERE deviceId='device1'

When I check the dataset in Power BI the name of columns were in uppercase |A|B| but when I used the alias in the query my columns were changed to lowercase |a|b|. This is the new query

SELECT v1 as A, v2 as B INTO [OutputBI] FROM [Input] WHERE deviceId='device1'

The reason why I change the query is because the variable names in the message were changed to A->v1, B->v2

My question is, Is there any way to use the alias in uppercase in the output of the job(Power BI in this case) ?

The problem is in the dataset of power BI, the first dataset recognized the column names in uppercase and when the query was changed, the column names were in lowercase, this is a trouble because of the dataset change, reports in power bi will not work, and I would have to do the reports again.


Solution

  • In the Configure section of the Stream Analytics job pane, selecting the Compatibility level and changing it to 1.1 should be able to solve the problem.

    In this new version, case-sensitivity is persisted for field names when they are processed by the Azure Stream Analytics engine. However, persisting case-sensitivity isn't yet available for ASA jobs hosted by using Edge environment.