microsoft / bc2adls

Exporting data from Dynamics 365 Business Central to Azure data lake storage
MIT License
88 stars 52 forks source link

No export of json files if table doesn't have data #124

Open Bertverbeek4PS opened 1 year ago

Bertverbeek4PS commented 1 year ago

Issue: When you have a multi company export and you add a table and perform an export in a company without any data the json files aren't created. So when you put multi company export on then you get an error that json files are different and that isn't possible because of multiu company export.

Resolution In codeunit 82570 "ADLSE Session Manager" you have the function: local procedure DataChangesExist(TableID: Integer): Boolean We can add a function a kind of the same function as CheckEntity function in codeunit 82562 "ADLSE Communication" And if EntityJsonNeedsUpdate or ManifestJsonsNeedsUpdate is true then the result of DataChangesExist will also be true.

DuttaSoumya commented 1 year ago

Thanks for the suggestion, and I do see the issue.

I am considering adding a new action called "Create lake schema" (or something similar) on the setup page which shall create these JSON files. Users may click on this action before starting their export jobs in multi- company export mode. You see, this would be a one- time task ever in that environment- so it is not optimal to check for that during every subsequent export job.

Bertverbeek4PS commented 1 year ago

That would indeed also a nice one. Because when you add something you have to preform always that action.

Maybe enforce this always. Even without multi company export. Then you have always the same process.