Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
rajat-srivastav
Regular Visitor

Appending Data to existing file in One Lake using APIs

Is it possible to append data to existing json file using One Lake (ADLS) APIs? 

I have been trying that using the standard ADLS APIs and getting the error - 

rajatsrivastav_0-1718616301983.png

Am I missing something or is it not possible at all to append data to existing fil? The file is inside of a lakehouse.

1 ACCEPTED SOLUTION
rajat-srivastav
Regular Visitor

Just wanted everyone to know that we were able to append data to an existing json file in OneLake.

 

We had a json file under the folder 'files' in a lakehouse.

We ended up using Azure Storage client library for .NET - https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-directory-file-acl-dotnet

 

Few things that we ended up doing differently to get things working -

  1. The account name in "https://{accountName}.dfs.core.windows.net" is "onelake"
  2. Instead of using "dfs.core.windows.net" ended up using "dfs.fabric.microsoft.com" making the url - "https://onelake.dfs.fabric.microsoft.com"
  3. the filesystem name was the workspace-id (Not workspace name)
  4. directory path was the lakehouse id (or item id, got it lakehouse>Files>properties(three dots)>URL
  5. sub directory was "Files/" (referring to Files folder in lakehouse as our json was present there). If you want to go inside a subfolder just add it in the sub-directory "Files/example/".

 

I still wonder why we were not able to achieve this with the APIs as defined in https://learn.microsoft.com/en-us/fabric/onelake/onelake-api-parity

 

View solution in original post

5 REPLIES 5
rajat-srivastav
Regular Visitor

Just wanted everyone to know that we were able to append data to an existing json file in OneLake.

 

We had a json file under the folder 'files' in a lakehouse.

We ended up using Azure Storage client library for .NET - https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-directory-file-acl-dotnet

 

Few things that we ended up doing differently to get things working -

  1. The account name in "https://{accountName}.dfs.core.windows.net" is "onelake"
  2. Instead of using "dfs.core.windows.net" ended up using "dfs.fabric.microsoft.com" making the url - "https://onelake.dfs.fabric.microsoft.com"
  3. the filesystem name was the workspace-id (Not workspace name)
  4. directory path was the lakehouse id (or item id, got it lakehouse>Files>properties(three dots)>URL
  5. sub directory was "Files/" (referring to Files folder in lakehouse as our json was present there). If you want to go inside a subfolder just add it in the sub-directory "Files/example/".

 

I still wonder why we were not able to achieve this with the APIs as defined in https://learn.microsoft.com/en-us/fabric/onelake/onelake-api-parity

 

Hi @rajat-srivastav ,

Glad to know that your query got resolved. Please continue using Fabric Community on your further queries.

Regarding Rest API, the best course of action is to open a support ticket and have our support team take a closer look at it.

 

Please reach out to our support team so they can do a more thorough investigation on why this it is happening: Link 

 

After creating a Support ticket please provide the ticket number as it would help us to track for more information.

 

Hope this helps. Please let us know if you have any other queries.

v-gchenna-msft
Community Support
Community Support

Hi @rajat-srivastav ,

Thanks for using Fabric Community.
Can you please share the document you are referring in order to perform the above particular operation? If you can provide above details, I can help you better.

I am attaching a doc for your reference - How to Call the OneLake API from Power Automate (No Enterprise App Needed) (linkedin.com)

Hello @rajat-srivastav ,

We haven’t heard from you on the last response and was just checking back to see if you got a chance to check my previous reply.

Thanks

Hello @rajat-srivastav ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
In case if you have any resolution please do share that same with the community as it can be helpful to others .
Otherwise, will respond back with the more details and we will try to help .
Thanks

Helpful resources

Announcements
FabricCarousel_June2024

Fabric Monthly Update - June 2024

Check out the June 2024 Fabric update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.