我正在努力获取将内容保存到数据湖的azure函数,尽管没有成功,但我尝试了以下技术,是否有示例?
azure-functions-datalake-extension
代码示例
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;
using Microsoft.Azure.WebJobs.Extensions.DataLake;
using Microsoft.Azure.Management.DataLake.Store;
using System.Threading.Tasks;
using System.IO;
namespace FunctionApp1
{
public static class Function1
{
[FunctionName("DataLakeExample")]
public static async Task Run([TimerTrigger("*/15 * * * * *")] TimerInfo myTimer, [DataLake("clientId", "clientSecret")] DataLakeProvider dataLake, TraceWriter log)
{
log.Info($"C# Timer trigger function executed at: {DateTime.Now}");
using (dataLake)
{
var path = Path.Combine("This", "Is", "Just", "A", "Test2");
await dataLake.CreateDirectory(path);
await dataLake.AppendToFile(Path.Combine(path, "foo"), "THIS IS JUST A TEST");
}
}
}
}
收到错误
我收到一个编译器错误,指出datalakeprovider不是 找到
我已经下载了Install-Package Microsoft.Azure.DataLake.Store -Version 1.1.19