【发布时间】:2021-06-10 15:40:35
【问题描述】:
我正在尝试使用 .NET 来自动运行流分析转换查询。 我已经阅读了这两个框架的文档
Microsoft.Azure.Management.StreamAnalytics
Microsoft.Azure.Management.StreamAnalytics.Models
还有 this guide 了解如何使用 .NET 运行流分析作业。
他们解释了如何创建、运行和停止作业,但我需要的有点不同。关于下图
我手动,上传一个json文件(上传图片中的示例输入),测试查询(图片中的测试查询按钮)并下载结果(图片中未显示按钮)。
我想使用 .NET 以编程方式完成所有这些步骤,但不确定我需要使用哪些对象。下面展示了如何创建一个转换,在我的例子中,我有一个并且想要运行它。 (我不想运行作业,因为我没有授权在我的 Azure 订阅中执行此操作,但有权运行查询)。
// Create a transformation
Transformation transformation = new Transformation()
{
Query = "Select Id, Name from <your input name>", // '<your input name>' should be replaced with the value you put for the 'inputName' variable above or in a previous step
StreamingUnits = 1
};
Transformation createTransformationResult = streamAnalyticsManagementClient.Transformations.CreateOrReplace(transformation, resourceGroupName, streamingJobName, transformationName);
ITransformationsOperations Interface 没有任何方法来运行转换。 有没有可能,有大神帮忙吗?
【问题讨论】:
标签: .net azure-stream-analytics