Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Invalid file stored in blob storage using DMF through postman

(1) ShareShare
ReportReport
Posted on by 390
Hi ,
 
I am trying to run DMF import scenario through dmf and facing some issues to view the file in the blob storage. Below are the steps I am performing.
 
  • Creating a unique name with .xml, .xlsx extensions while trying to fetch the blob url using Microsoft.Dynamics.DataEntities.GetAzureWriteUrl.
  • Putting the zip file with manifest, header and entity data (in .xlsx format).
  • When checking the dmf blob folder in azure storage explorer  I see the file with unique name given in 1st step but unable to open it while trying with both .xlsx and .xml but I can open it when I give the unique name as .zip.
  • The issue is that the job is not executing when I am using the .xlsx and .zip as unique file extension.
 
My doubt is what should be the unique file name , should it be same as the zip file we upload to blob url with .zip extension or we can have the unique file name in any other extensions like .xml and .xlsx
 
//
 
//
 
Thanks!
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Invalid file stored in blob storage using DMF through postman
    OK, this is a problem that many people report... :-(
  • Dev Profile Picture
    Dev 390 on at
    Invalid file stored in blob storage using DMF through postman
    Yes Martin my issue is resolved and I tried verifying the answer many times but it keeps loading. I will try again and verify it as soon as I am able to  :)
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Invalid file stored in blob storage using DMF through postman
    Is your question answered? If so, please verify the answer. If not, please tell us what you still need from us.
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Invalid file stored in blob storage using DMF through postman
    It simply means that files should have correct extensions. In your case, the ZIP file should have .zip extension and not .xlsx extension.
    The file is not corrupted; it's still a ZIP archive and you can open with programs capable of extracting ZIP archive. But trying to open the ZIP archive in Excel can't succeed, because Excel expects Excel spreadsheets (and such files), not ZIP archives.
     
    Note that is has nothing to do with F&O, web services or Postman. It's about understanding what a file is and that Windows select the default program for opening a file based on the extension of the file name.
  • Dev Profile Picture
    Dev 390 on at
    Invalid file stored in blob storage using DMF through postman
    Ok so you mean the unique file name should be the same extension as the package and the file saved in the blob is actually a zip file but since we gave a different extension it is not opening and is corrupted.
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Invalid file stored in blob storage using DMF through postman
    Let me explain it step by step this time.

    You said: I set unique file name as customerV3.xlsx and i upload a zip package Customers V3.zip
    -> You uploaded Customers V3.zip, but you renamed it to customerV3.xlsx. That makes little sense; now it looks like if the file was an Excel spreadsheet, but it's actually still the same ZIP archive.
     
    Then I see file customerV3.xlsx and not the zip file in blob.
    -> It's ZIP file, you just used "customerV3.xlsx" as its name (in the first step).
     
    customerV3.xlsx doesn't open
    -> I guess you're trying to open it in Excel, but it can't work, because it's a ZIP file and not an Excel spreadsheet.
  • Dev Profile Picture
    Dev 390 on at
    Invalid file stored in blob storage using DMF through postman
    Yes I tried that and it worked for the postman and job completed successfully but again my question is for blob storage still remains .
    I set unique file name as customerV3.xlsx and i upload a zip package Customers V3.zip on blob (I use different formatts .xlsx in step 1 to understand what is the file name and format saved on the blob step 1 or 2) but then I see file customerV3.xlsx and not the zip file in blob. customerV3.xlsx doesn't open and the job is successful as the data and package is correct this time but my doubt regarding why don't I see the actual zip package in blob storage that we upload. What exactly is the use of specifying the unique file name in step 1. 
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Invalid file stored in blob storage using DMF through postman
    I think I'm starting to figure out what you're doing.
     
    You complain about a problem with a batch, but there is none involved, because you're using the package API and not the recurring integration API.

    The API requires a package, but you never tested whether the package works. What you did was creating an importing project with Excel as the source format and imported the Excel spreadsheet. This verifies that the Excel file is correct, but it tells you nothing about whether your ZIP file is correct and and can be imported.
     
    Are my assumptions correct?
     
    I don't know how you created your package file (PackageHeader.xml etc.), but the name of the Excel file looks wrong to me, so there is a chance that other things are wrong to. I suggest you forger your current package and create a new one instead. Create an export project and export a package. Then unzip the package, change just data inside the Excel files (not its name) and try to import it back (as a package). When you're able to import the file manually, you can try it through the API.
  • Dev Profile Picture
    Dev 390 on at
    Invalid file stored in blob storage using DMF through postman
     
    Here they are setting file name as D365123456.XML and upload a zipped package with some other name (Yf_A__.zip) and when I tried the same it stores the file as D365123456.XML and not Yf_A__.zip as in the example in the link. So ideally we should use the same name at both places and same extensions but when i use anything other than package in step 2 it gives error that package header is missing.
    This stored file D365123456.XML does not open and throws error from blob container dmf.
  • Dev Profile Picture
    Dev 390 on at
    Invalid file stored in blob storage using DMF through postman
    Hi Martin,
     
    The excel is importing successfully manually with same data.
    I tried to upload excel in the blob url instead of the zipped package in step 2 but it throws error that Package header is missing so I assumed we need to send the package to blob storage for import.
    My one of the doubt here is we upload the file in 2nd step on the blob url but we give a unique file name in 1st step when we try to retrieve the blob url and whatever we set as unique file name in step 1 is what shows on blob storage and not the package we upload in step 2.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans