public class SampleFunction
{
private readonly ILogger _logger;
public SampleFunction(ILoggerFactory loggerFactory)
{
_logger = loggerFactory.CreateLogger<SampleFunction>();
}
[Function("ReadFromADLS")]
public void Run([TimerTrigger("0 */5 * * * *")] MyInfo myTimer)
{
_logger.LogInformation($"Function executed at: {DateTime.Now}");
// Access Key Vault
var kvClient = new SecretClient(new Uri("https://<your-keyvault>.vault.azure.net/"), new DefaultAzureCredential());
KeyVaultSecret secret = kvClient.GetSecret("StorageAccountKey");
// Connect to ADLS
var serviceClient = new DataLakeServiceClient(
new Uri("https://<your_account>.dfs.core.windows.net"),
new Azure.AzureSasCredential(secret.Value)
);
var filesystem = serviceClient.GetFileSystemClient("raw-data");
var paths = filesystem.GetPaths();
foreach (var path in paths)
{
_logger.LogInformation($"Found file: {path.Name}");
}
}
}
Platform-as-a-Service (PaaS) provides an abstraction layer that allows developers to focus on building business logic without managing underlying infrastructure. Azure Function Apps, as a serverless offering, enable event-driven execution of code written in C#, responding to triggers such as HTTP requests, queue messages, or scheduled timers. These apps scale automatically based on demand, reducing operational overhead and ensuring cost-efficiency. Security and secret management are simplified using services like Azure Key Vault, where sensitive credentials, API keys, and connection strings are stored securely and accessed programmatically during runtime.
For data persistence and analytics, cloud storage solutions such as Azure Data Lake Storage, Amazon S3, and Google Cloud Storage provide flexible, durable object storage. Each platform allows structured and unstructured datasets to reside in scalable containers, buckets, or directories, supporting ingestion, transformation, and consumption by downstream pipelines. Combining Function Apps with cloud storage and Key Vault creates a highly maintainable, modular architecture where data movement, transformation, and sensitive configuration handling are seamlessly orchestrated.
using System;
using System.IO;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Logging;
using Azure.Identity;
using Azure.Security.KeyVault.Secrets;
using Azure.Storage.Files.DataLake;