我建议您自己编写一个 Azure 数据工厂自定义活动来实现此目的。我为最近的一个项目做了这个。
将 C# 类库添加到您的 ADF 解决方案并创建一个继承自 IDotNetActivity 的类。然后在 IDictionary 方法中发出 HTTP Web 请求以获取数据。首先将下载的文件放到 blob 存储中,然后有一个下游活动将数据加载到 SQL DB 中。
public class GetLogEntries : IDotNetActivity
{
public IDictionary<string, string> Execute(
IEnumerable<LinkedService> linkedServices,
IEnumerable<Dataset> datasets,
Activity activity,
IActivityLogger logger)
{
等等……
HttpWebResponse myHttpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
您可以使用 ADF 链接服务对存储帐户进行身份验证,并定义您希望将容器和文件名作为输出的位置等。
这是我用于数据湖的示例。但是有一个几乎相同的 Blob 存储类。
Dataset outputDataset = datasets.Single(dataset => dataset.Name == activity.Outputs.Single().Name);
AzureDataLakeStoreLinkedService outputLinkedService;
outputLinkedService = linkedServices.First(
linkedService =>
linkedService.Name ==
outputDataset.Properties.LinkedServiceName).Properties.TypeProperties
as AzureDataLakeStoreLinkedService;
不要打扰活动的输入。
您还需要一个 Azure Batch 服务来处理已编译类的计算。请查看我的博客文章。
https://www.purplefrogsystems.com/paul/2016/11/creating-azure-data-factory-custom-activities/
希望这会有所帮助。