Пример данных:
[{
"id": "0001",
"type": "donut",
"name": "Cake"
},
{
"id": "0002",
"type": "donut2",
"name": "Cake2"
]
Поддерживает ли аналитика Azure Stream вложенные условия с использованием CASE
заявление?
Основываясь на моем тесте, он поддерживает условия вложенного случая.
SQL:
select jsoninput.id as id, jsoninput.type as type ,
case when
((case when jsoninput.id = '0001' then '0' else '1' end) = '0' ) then '0'
else '1' end as res
from jsoninput
Выход:
![enter image description here](https://i.stack.imgur.com/L7mxa.png)
Кто-нибудь может привести пример выражения Simple CASE?
SQL:
select jsoninput.id as id, jsoninput.type as type ,
case jsoninput.id when '0001' then 'true' else 'false' end as res
from jsoninput
Выход:
![enter image description here](https://i.stack.imgur.com/yI4hh.png)