Azure application insights 来自App Insights BLOB的流分析无法运行:GetArrayElement“;表达式不受支持";

Azure application insights 来自App Insights BLOB的流分析无法运行:GetArrayElement“;表达式不受支持";,azure-application-insights,azure-stream-analytics,Azure Application Insights,Azure Stream Analytics,背景:我基本上是想从PowerBI的应用程序洞察中获取数据。这需要包括长期趋势分析,因此我(按照指示)尝试设置连续导出,并使用流分析将其导出到Power BI数据集 我的第一个(非常基本的)测试成功了,但现在我尝试通过提取一些自定义维度(一个称为“SP_Page_Topic”)来稍微提高复杂性,我不断得到以下错误: “流作业失败:流分析作业存在验证错误:查询编译错误:不支持表达式:'GetArrayElement(context.custom.dimensions,0).SP_Page_Topi

背景:我基本上是想从PowerBI的应用程序洞察中获取数据。这需要包括长期趋势分析,因此我(按照指示)尝试设置连续导出,并使用流分析将其导出到Power BI数据集

我的第一个(非常基本的)测试成功了,但现在我尝试通过提取一些自定义维度(一个称为“SP_Page_Topic”)来稍微提高复杂性,我不断得到以下错误:

“流作业失败:流分析作业存在验证错误:查询编译错误:不支持表达式:'GetArrayElement(context.custom.dimensions,0).SP_Page_Topic'…”

这在查询生成器的“测试”功能中运行得非常好,我可以看到输出的预览,看起来非常正确

但是当流分析作业运行时,我只是一遍又一遍地遇到这个错误

注意-这是我在流分析中的查询:

WITH Step1 AS (
SELECT
      context.operation.name as PageUrl,
      context.data.eventTime as EventTime,
      context.device.type as DeviceType,
      context.device.osVersion as OSVersion,
      context.device.browser as Browser,
      context.device.browserVersion as BrowserVersion,
      context.location.continent as Region,
      context.location.country as Country,
      GetArrayElement(context.custom.dimensions, 0).SP_Page_Topic as Topic
FROM
[AllInput]
)

SELECT * INTO [PageViewOutput]
FROM Step1

您必须再添加一个步骤,以避免引用GetArrayElement结果的属性

WITH Step1 AS (
SELECT
    context.operation.name as PageUrl,
    context.data.eventTime as EventTime,
    context.device.type as DeviceType,
    context.device.osVersion as OSVersion,
    context.device.browser as Browser,
    context.device.browserVersion as BrowserVersion,
    context.location.continent as Region,
    context.location.country as Country,
    GetArrayElement(context.custom.dimensions, 0) as Page
FROM
[AllInput]
),
Step2 AS (
SELECT
    PageUrl,
    EventTime,
    DeviceType,
    OSVersion,
    Browser,
    BrowserVersion,
    Region,
    Country,
    Page.SP_Page_Topic as Topic
FROM Step1
)

SELECT * INTO [PageViewOutput]
FROM Step2