The following binding can be used with Azure Functions v2 C# Class Library to connect to Azure Data Lake Storage Gen1.
Clone repo and add a reference to the WebJobs.Extensions.DataLake project.
using Microsoft.Azure.WebJobs.Extensions.DataLake;
Add the following attributes that include the account FQDN, ApplicationId, Client Secret and Tenant Id.
[DataLakeStore(
AccountFQDN = @"fqdn",
ApplicationId = @"applicationid",
ClientSecret = @"clientsecret",
TenantID = @"tentantid")]out DataLakeStoreOutput dataLakeStoreOutput
View a sample function using output binding.
Add FileName property to retrieve a specific file from your Datalake Store.
[DataLakeStore(
AccountFQDN = @"fqdn",
ApplicationId = @"applicationid",
ClientSecret = @"clientsecret",
TenantID = @"tentantid",
FileName = "/mydata/testfile.txt")]Stream myfile
View a sample function using input binding.
- Azure Data Lake Store Gen1
- Setup Service to Service Auth using Azure AD
- Azure Functions and Webjobs tools extension
- Add the application settings noted below.
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"fqdn": "<FQDN for your Azure Lake Data Store>",
"tentantid": "<Azure Active Directory Tentant for Authentication>",
"clientsecret": "<Azure Active Directory Client Secret>",
"applicationid": "<Azure Active Directory Application ID>",
"blobconn": "<Azure Blobg Storage Connection String for testing Blob Trigger>"
}
}
If you wish to run and or make modifications to the E2E testing you will need to create an appsettings.json with all the required settings. Use the standard format for values instead of the functions formatting.
{
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"fqdn": "<FQDN>",
"tentantid": "<Tentant ID>",
"clientsecret": "<Client Secret>",
"applicationid": "<Application ID>",
"blobconn": "<Blob Storage Connection string for Trigger>"
}
This project is under the benevolent umbrella of the .NET Foundation and is licensed under the MIT License
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.