web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Invalid file stored in blob storage using DMF through postman

(1) ShareShare
ReportReport
Posted on by 451
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!
I have the same question (0)
  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at
    You said in the second points that you created a ZIP file, so it's not clear to me why you used .xlsx extension and you expect something else than your ZIP file.
     
    Please tell us more about your problem that just "the job is not executing". I'm assuming that you're talking about recurring integrations batch job. Don't you mean that it does run (according to its schedule) but it fails? If it never run at all, it wouldn't be caused by your file, would be?
     
    Also, are you able to import the file manually? I suspect you may have configured the project to expect an Excel spreadsheet instead of the package (ZIP).
  • Dev Profile Picture
    451 on at
    Hi Martin,
     
    I mean that one of the files in zip file i.e. entity excel (SSCust10) has .xlsx format. The job not running is not my main concern it may be due to some other issue but what should be the unique name file and its extension. Can we set unique file name same as the zip file we upload (SSCust10.zip in this case) or it can be anything else with any extensions like .xml or .xlsx
    When I am trying to access the file through blob storage in any format it is not opening 
     
  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at
    Yes, I understand that you have a package ZIP file containing an XSLX. You upload the ZIP file, not the XSLX file and you see that the ZIP file was uploaded, therefore it seems to work correctly.
     
    Of course that you can give the ZIP file any extension, e.g. .jpg, but the name doesn't change the content. It's still a ZIP archive, just with a misleading name. Using a wrong extension gives you no benefit, just confusion and less comfort (e.g. because the default program for opening a file is picked by the extension), therefore you shouldn't do that.
     
    Before we go into discussion how to create a package, please confirm that your intention is using a package import and not just importing an Excel file. It's possible that you're confused by the options and/or those two distinct data management APIs. You didn't tell us whether you can import the file manually, but I believe you can't. If you want to import an Excel file directly, you shouldn't use a package (ZIP) and if you want to use a package, you didn't seem to create it in the right way.
     
    I don't want to go to details of all the possible options. I'll wait for more information about your intention.
  • Dev Profile Picture
    451 on at
    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.
  • Dev Profile Picture
    451 on at
     
    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.
  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at
    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
    451 on at
    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
    237,880 Most Valuable Professional on at
    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
    451 on at
    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.
  • Verified answer
    Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at
    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans
Liquid error: parsing "/globalsearch/?q=December+++in+german" - Nested quantifier +.