Search code examples
c#.netazureazure-functionsazure-data-lake

Connection to Azure data lake Gen 2 from azure function


I'm trying to connect to Azure Data Lake Storage Gen2 from an Azure Function to import some XML files and convert them to JSON. But my code is not working:

var creds = ApplicationTokenProvider.LoginSilentAsync(tenantId, applicationId, secretKey).Result;  
var adlsFileSystemClient = new DataLakeStoreFileSystemManagementClient(creds);
var result = adlsFileSystemClient.FileSystem.Open(adlsAccountName, "/Test/xml.xml");

This returns an error: The remote name could not be resolved + "azuredatalakestore.net" while actually DNS suffix should have been different.


Solution

  • Taken from Known issues with Azure Data Lake Storage Gen2

    SDK support for Data Lake Storage Gen2 accounts
    There aren’t SDKs available that will work with Data Lake Storage Gen2 accounts.