1. Field ‘name’ is required during creating data model in CDF. But it is not required if create through SDK:
data_models = lDataModelApply(space="mySpace",external_id="myDataModel",version="v1")] c.data_modeling.data_models.apply(data_models)
2. For data models have values in ‘name’ and ‘description’ fields these fields would be cleared up if these parameters are not specified in DataModelApply.
These code will clear name and description values (if ‘myDataModel’ had them):
data_models = oDataModelApply(space="mySpace",external_id="myDataModel",version="v1")] c.data_modeling.data_models.apply(data_models)
These code won’t clear name and description values (if ‘myDataModel’ had them):
data_models = lDataModelApply(space="mySpace",external_id="myDataModel",version="v1", name=”myDataModel”, description=”My Description”)]
c.data_modeling.data_models.apply(data_models)
To fix make changes in cognite-sdk:
- Set ‘name’ as required for DataModelApply.
- Fix clearing values from name and description in DataModelApply when these parameters are not specified.