Skip to main content
Solved

Override type for direct relations

  • February 17, 2025
  • 6 replies
  • 97 views

Ayush Daruka
Seasoned

I came across this documentation regarding how we can use GQL to override the type of direct relation when using a CDM feature.
Is there a similar documentation to highlight the changes needed to be made in the YAMLs when using CDF toolkit to deploy our model? 
Please note that I tried dumping the working GQL, but the resulting yamls did not work when tried the other way around.

Best answer by Anders Albert

If you use the Cognite-Toolkit, and run `cdf modules init` and select any of the models all of them show an example of overwriting the source. 

View original
Did this topic help you find an answer to your question?

Ayush Daruka
Seasoned

@Snehal-Jagtap 

 


Anders  Albert
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • February 17, 2025

@Ayush Daruka What do you mean it did not work? Can you provide the error output you got. If you use the cdf dump datamodel command the yaml that is produced should be valid to deploy.

 

The similar term is to use the `source` when mapping to a container property in a view

 


Ayush Daruka
Seasoned
Anders Albert wrote:

@Ayush Daruka What do you mean it did not work? Can you provide the error output you got. If you use the cdf dump datamodel command the yaml that is produced should be valid to deploy.

 

The similar term is to use the `source` when mapping to a container property in a view

 

 

@Anders Albert I mean that the override did not happen, when I deployed the generated yaml files. There was no error since the model got deployed, but it did not override the CogniteAsset to CustomCogniteAsset as shown in the example.
If you have a example yaml that works for the same example, please share.


Anders  Albert
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • February 19, 2025

If you use the Cognite-Toolkit, and run `cdf modules init` and select any of the models all of them show an example of overwriting the source. 


Ayush Daruka
Seasoned

@Anders Albert I dont know why, but the same yaml has worked as expected when I tried today. Thanks anyway!!


Anders  Albert
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • February 26, 2025

Good to hear it was resolved 😀


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings