Receiving an internal error when publishing data model

  • 23 March 2022
  • 7 replies

  • Known Participant
  • 11 replies

I have just cloned a workspace (workspace A) + its data to a new workspace (workspace B). I then created a new PostgreSQL data source which I want to map to the fields in workspace B. The new database is 90% the same as the old one with just a few minor changes.

If I just switch the data source on Workspace B, it loses all field mappings and I have to set them all again by hand.

To work around this, I have exported the data model from workspace A as a Json file which I have then imported into Workspace B after connecting the new data source. This seems to work and all fields are now mapped as they should be.

The differences between the old and new data sources mean I must add a new column in two tables and drop 3 columns in another couple of tables. This seems to go well when editing the data model.

However, when I click the publish button I see the following error and the model will not save:

[{"message":"Internal error [%s, %s].","requestId":"modeler_EMwODbrZNn_IYHR2xoIsp:Kkpz9mqkiecUeTtG:4dpwgvedim1mnqvm","parameters":["handle_exception","hide_internal"],"component":"Stock::MD","errorClass":"GDC::Exception::Base"}]


Can anyone give me any pointers as to what I’m doing wrong and/or how to solve this?




Best answer by Moises Morales 23 March 2022, 18:26

View original

7 replies

Userlevel 3



Can you let us know how are you dropping/adding the columns in your data model? Please note that you will have to do this via MAQL DDL so the columns can be dropped properly. You can check this post for more info. Also, please make sure you are using the correct table name in the dataset mapping menu in the model. More info here:





Thank you for your quick reply Moises.

I was just deleting the fields using the standard data model editor previously, so I tried your suggested method of using the MAQL DDL editor and that did the trick.

After deleting the necessary fields this way, I could add new fields using the standard data model editor and it published just fine.


Thanks again.



Hello, I have another quick question regarding this issue.

I have successfully saved the updated data model, but now when running a data load, it fails with the following error:


Reason: Missing reference key specification for attribute "attr.products.productattributecolour"


Where attr.products.productattributecolour is one of the removed fields. I think this is due to metrics or calculated attributes that make use of this field. Is there a way of easily removing anything that references these fields or should I go through all metrics etc by hand to remove them?

Or is this error due to something else?


Thanks again

Userlevel 3

This error generally indicates that the model is in an inconsistent state. You may need to try running synchronization command to fix this. Could you please try and let us know if it helps?

This error generally indicates that the model is in an inconsistent state. You may need to try running synchronization command to fix this. Could you please try and let us know if it helps?

Thanks Joseph, I've just tried this but unfortunately I’m still getting the same error when running the data load.

Userlevel 3

It looks like this attribute was also removed from the UI only and it still exists on the backend. Can you run the MAQL DDL command again to drop it? If you go ahead and completely delete this attribute, then synchronize your dataset, this should resolve the issue. You can check if there are more model objects in “deprecated” status by navigating to the model definition: gdc/projects/{WID}/model/view?includeDeprecated=true. 

Hi Moises, thanks for getting back to me. I tried running the commands again and resynchronising but I’m still seeing the error.

I also tried removing and recreating the workspace but the problem persists.

I think this issue occurs if I clone a workspace, then import a data model over the top of the cloned model. I even tried editing the exported Json file to remove the fields and their mappings that I don’t need. This works and I can import the model and save it successfully, but on data load I get the same error above

Missing reference key specification for attribute "attr.products.productattributecolour"

even though that field is not in the Json at all.

The reason I am doing this is that I’m trying to figure out a way of setting the field mappings on a cloned workspace without having to manually type each field in to the model using the UI. Is there another way I could do this?