cancel
Showing results for 
Search instead for 
Did you mean: 

Read files for Azure "File Shares"

Chandan
New Contributor III

I have a new requirement to read the files stored in Azure "File Shares". I didnt have the knowledge about "File Shares" in azure and did a little research. Its a virtual drive which can be used for storing files and uses the SMB protocol to read from this storage.
fileShare.png

 

i have setup the file reader like this

smb://{accountName}}.file.core.windows.net/{fileSharefolder}/{pathToFile}
 
I have also tried setting up SMB account but it asks for a username and password which i dont have.
I have azure account name and access key which i have used in setting SMB account. ( This could be the issue i'm not sure though ).

In validation, i'm getting the following error :
(actual values masked with generic name here)
"error": "Error occurred while creating a mount smb://accountname.file.core.windows.net/fileshare/pathtofile" 

Can someone guide or assist me with setting this up ? Also it will be very helpful if you can share a sample pipeline showing SMb account setup.
4 REPLIES 4

Chandan
New Contributor III

@bojanvelevski @sreddi @del Requesting your expertise on this topic.

@Chandan 

Please find the SMB Account and Snap settings - 

SMB Account Settings - 

SMB Version1_account.png

SMB Snap settings from pipeline parameters - 

SMB  Pipeline param path.png

 

SMB Snap settings along with Output Preview - 

Snap settings.png

 

Chandan
New Contributor III

I'm able to create the SMB string but i guess the SMB account setup is messed up.
I'm using correct domain name <myazureaccountname>.file.core.windows.net 
What i dont understand is what should i put username and password.
Is it the Active Directory credentials of my user account i should put here ?
is there a way i can just connect to SMB storage using azure account name and access key ?

darshthakkar
Valued Contributor

Hi @Chandan,

Have you used MS Azure Storage explorer by any chance? Reason being, it will make things easier for you. If you have admin rights in your organization then I would suggest to create a "Basic Auth" account like below in snapLogic:

darshthakkar_0-1694614077260.png

With the following username and password (works ONLY if you have admin rights):

 

darshthakkar_2-1694614470291.png

 

After the account has been setup, you can pretty much use it across different pipelines, please ensure that the account has been created in "shared" folder. Using a directory browser (if you have multiple files under that location in Azure) followed up by a file reader should help you.

Thank you.

Regards,

Darsh