0

I am currently trying to send a csv file using Azure Function with NodeJs to Azure Data Lake gen2 but unable to do the same, Any suggestions regarding the same would be really helpful. Thanks.

I have tried to use Credentials of blob storage present in ADLS gen2 using the Blob storage API's but i am getting an error.

inr
  • 1
  • 1

1 Answers1

0

For now this could not be implemented with SDK. Please check this known issue:

Blob storage APIs are disabled to prevent feature operability issues that could arise because Blob Storage APIs aren't yet interoperable with Azure Data Lake Gen2 APIs.

And in the table of features, you could find the information about APIs for Data Lake Storage Gen2 storage accounts:

multi-protocol access on Data Lake Storage is currently in public preview. This preview enables you to use Blob APIs in the .NET, Java, Python SDKs with accounts that have a hierarchical namespace. The SDKs don't yet contain APIs that enable you to interact with directories or set access control lists (ACLs). To perform those functions, you can use Data Lake Storage Gen2 REST APIs.

So if you want to implement it, you have to use the REST API:Azure Data Lake Store REST API.

George Chen
  • 13,703
  • 2
  • 11
  • 26
  • Thanks for the reply, yes we tried using the ADLS REST api's but were getting authentication issue, now we would try multi protocol access(preview) mode.Will update this thread once we have clarity on that method. – inr Sep 10 '19 at 09:46
  • @inr, for azure rest api authentication, you need the token, you could refer to this blob.http://innerdot.com/azure/authenticating-to-azure-resource-manager-using-java – George Chen Sep 10 '19 at 09:52
  • @GeorgeChen facing the same problem, currently not having access to the Azure Active Directory Credentials. Can we use the SAS token for the Authentication header? I was trying to generate the Authentication header like this: `Authorization="SharedKey AccountName:sig` (keyValueFromSAStoken) I have taken reference for the Authorization header from [here](https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key) – Desmond Sep 11 '19 at 08:03
  • Yes, data lake gen2 supports sas token.you could check it here.https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/storage/blobs/data-lake-storage-access-control.md#shared-key-and-shared-access-signature-sas-authentication – George Chen Sep 11 '19 at 08:09
  • yeah, I have tried with the SAS tokens, but unable to form the Signature perfectly, neither the whole SAS token nor the sigKeyValue of SAS token is allowing me to authenticate the REST call. This is the official format for Authentication header `Authorization="[SharedKey|SharedKeyLite] :"` Here I'm not able to fill this Signature variable properly. – Desmond Sep 11 '19 at 09:05