Answered by:
ADF Copy to Blob is ok, but how to copy to File Directory?

Question
-
I try to Bulk Copy from SQL Server to Data Lake gen2.
I have succesfully bulk copied to Block Blob, then I tried to modify data set to copy to File System. Data Set still copy files to Blob. What need to be done that ADF copy to File System so that I get files in CSV format, I preserve Hierarchy and I can open them easily?
I can see that "filesystem" is missing from location of dataset. I cannot see such setting in Azure Portal UI. How to define?
https://docs.microsoft.com/en-us/azure/data-factory/tutorial-bulk-copy-portal
{"name": "Data_Lake_D_Storage","type": "Microsoft.DataFactory/factories/linkedservices","properties": {"type": "AzureBlobFS","typeProperties": {"url": "https://mydatalaked012345.dfs.core.windows.net","encryptedCredential": "111111111111111111111111111"}}}{
"name": "DataLake_DelimitedText1","properties": {"linkedServiceName": {"referenceName": "Data_Lake_Storage","type": "LinkedServiceReference"},"type": "DelimitedText","typeProperties": {"location": {"type": "AzureBlobFSLocation","folderPath": "mydirectory","container": "mycont"},"columnDelimiter": ",","escapeChar": "\\","firstRowAsHeader": true,"quoteChar": "\""},"schema": []}}
Kenny_I
- Edited by Kenny_I Monday, June 10, 2019 4:31 AM
Sunday, June 9, 2019 2:39 AM
Answers
-
Hi Kenny,
You can do it easily from the UI. Please follow the following steps (Assuming you have a file share created already):
- Create a new Connection(Linked Service) of type - Azure File Storage in ADF as shown in the below screenshot :
- In the Host field, specify :
\\<storage name>.file.core.windows.net\<file service name>
As shown below :
- Hit on Test Connection to verify that everything is working fine.
- Create a new dataset of type Azure File Storage in the ADF Portal and select the format you want to copy to (Parquet, JSON, DelimitedText or csv, Avro, etc.)
- In the Linked Service field, select the linked service created in the previous steps.
- Once the dataset is created, you can use it as a source or sink(in your case) in your copy activities.
Hope this helps.
- Proposed as answer by ChiragMishra-MSFTMicrosoft employee Tuesday, June 11, 2019 9:37 AM
- Marked as answer by Kenny_I Tuesday, June 11, 2019 9:58 AM
Tuesday, June 11, 2019 9:37 AM - Create a new Connection(Linked Service) of type - Azure File Storage in ADF as shown in the below screenshot :
All replies
-
Hi Kenny,
As discussed on the other thread opened by you(link), you can store csv files in the blob storage (ADLS Gen2). This will make it easy to read in ADF as well.
This way you will be able to preserve hierarchy as well.
However, you can copy to Azure File Storage as well. Please refer this doc for more detalis.- Proposed as answer by ChiragMishra-MSFTMicrosoft employee Monday, June 10, 2019 11:59 AM
- Edited by ChiragMishra-MSFTMicrosoft employee Monday, June 10, 2019 12:05 PM
Monday, June 10, 2019 11:59 AM -
I have issues with copy to File Storage and I need advice.
Is this possible to UI? Please advice? I cannot make working. Data is copied always to Block Blob.
Kenny_I
Tuesday, June 11, 2019 8:19 AM -
Hi Kenny,
You can do it easily from the UI. Please follow the following steps (Assuming you have a file share created already):
- Create a new Connection(Linked Service) of type - Azure File Storage in ADF as shown in the below screenshot :
- In the Host field, specify :
\\<storage name>.file.core.windows.net\<file service name>
As shown below :
- Hit on Test Connection to verify that everything is working fine.
- Create a new dataset of type Azure File Storage in the ADF Portal and select the format you want to copy to (Parquet, JSON, DelimitedText or csv, Avro, etc.)
- In the Linked Service field, select the linked service created in the previous steps.
- Once the dataset is created, you can use it as a source or sink(in your case) in your copy activities.
Hope this helps.
- Proposed as answer by ChiragMishra-MSFTMicrosoft employee Tuesday, June 11, 2019 9:37 AM
- Marked as answer by Kenny_I Tuesday, June 11, 2019 9:58 AM
Tuesday, June 11, 2019 9:37 AM - Create a new Connection(Linked Service) of type - Azure File Storage in ADF as shown in the below screenshot :