Skip to main content
Answer

Extend core data model

  • May 8, 2025
  • 1 reply
  • 37 views

Forum|alt.badge.img+1

Hello people,

I’m testing CDM and I want to extend a current model type, I may do it wrong, but my idea is. I’m creating a new type called MyModel, that will be pretty much and CogniteActivity + new fields.

But I don’t know what I’m doing wrong.


type MyModel
@import (
dataModel: {
externalId: "CogniteActivity",
space: "cdf_cdm",
version: "v1"
}
){
FieldA: String,
FieldB: String
}

I got some guidance from this link https://docs.cognite.com/cdf/dm/dm_guides/dm_extending_core_data_model

When I try to save, I got this error

{   "title": "Error: could not update data model",   "message": "An error has occured. Data model was not published.",   "extra": "[Line: 40] Data model 'DataModelRef(space=cdf_cdm, externalId=CogniteActivity, version=v1)' cannot be found" }

Thanks in advance

Best answer by Andre Alves

Hi ​@Alex Almeida 

If you're looking to extend the core data model (cdf_cdm or cdf_idm), I recommend checking out the following documentation and giving Neat a try:

🔗 https://cognite-neat.readthedocs-hosted.com/en/latest/

Let me know if you need any help getting started!

 

1 reply

Andre Alves
MVP
Forum|alt.badge.img+14
  • MVP
  • Answer
  • May 8, 2025

Hi ​@Alex Almeida 

If you're looking to extend the core data model (cdf_cdm or cdf_idm), I recommend checking out the following documentation and giving Neat a try:

🔗 https://cognite-neat.readthedocs-hosted.com/en/latest/

Let me know if you need any help getting started!