Bertverbeek4PS / bc2adls

Exporting data from Dynamics 365 Business Central to Azure data lake storage or MS Fabric lakehouse
MIT License
49 stars 20 forks source link

Procedure for obsolete data after upgrade #105

Closed greglong1 closed 3 weeks ago

greglong1 commented 6 months ago

Hi Bert I'm testing and documenting a scenario where after an upgrade, a field has been made obsolete. However I can't seem to get past the following error message:

"The field ICPartnerCode-41 in the entity CompanyInformation-79 is already present in the data lake and cannot be removed."

I understand that there needs to be a table reset process from your FAQs https://github.com/Bertverbeek4PS/bc2adls/blob/main/.assets/FAQs.md#what-should-i-do-when-a-field-i-was-exporting-has-been-made-obsolete

I've tried the following processes: Scenario 1

  1. Deleted table CompanyInformation-79 from the lakehouse
  2. Cleared Schema Export
  3. Unselected the ICPartnerCode-41 field in the CompanyInformation-79
  4. Re-exported the schema -> error message

Scenario 2

  1. Cleared Schema Export
  2. Reset the CompanyInformation-79 table
  3. Unselected the ICPartnerCode-41 field in the CompanyInformation-79
  4. Re-exported the schema -> error message

Scenario 3

  1. Cleared Schema Export
  2. Deleted CompanyInformation-79 from Export
  3. Export the Schema
  4. Exported the data
  5. Cleared Schema Export
  6. Added the CompanyInformation-79 and relevant fields (not the obsolete field)
  7. Re-exported the schema -> error message

Is there another process I'm missing or was this an issue that has been fixed in a recent build?? I'm on a very old build dated back to October 2023.

Bertverbeek4PS commented 6 months ago

Hi @greglong1 what kind of error do you get? Because when an field is on obsolete you must first disable the multi company boolean. disable the field. Clear schema. Export schema en then do a reset. Then you should be export your new dataset.

And offcoursr delete the table in the lake house.

In the newest version I added an option to delete all the incorrect fields. Then first do a clear schema. Fix deleted schema option. Schema export. Reset table and export it again.

That should work.

greglong1 commented 6 months ago

Hi Bert - I think I've tried your above, but I'll have another go next week. If this doesn't work, I'll upgrade the software to the latest version and try again. Thanks

greglong1 commented 4 months ago

@Bertverbeek4PS - sorry I haven't updated this issue as our BC development team has had other priorities. I will need them to update BC2ADLS as my current version (Oct 2023) is broken in the BC V24 environment. Will update when I get this sorted out.