private static DataLakeFileSystemClient GetDataLakeClient(DataLakeConfig settings, ILogger log) { // This works as long as the account accessing (managed identity or visual studio user) has both of the following IAM permissions on the storage account: // - Reader // - Storage Blob Data Reader var credential = new DefaultAzureCredential(); log.LogInformation($"Using credential Type: {credential.GetType().Name}"); var client = new DataLakeFileSystemClient(new Uri(settings.BaseUrl), credential); if (!client.Exists()) { return(null); } return(client); }
private static string GetParamsJsonFragment(DataLakeConfig settings) { return($"\"debugInfo\": {AssemblyHelpers.GetAssemblyVersionInfoJson()}," + $"\"parameters\": {JsonConvert.SerializeObject(settings, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore })}"); }