Skip to main content
Seasoned ⭐️⭐️⭐️
January 20, 2025
Solved

Utility to take dump of CDF project / Convert graphQL model to yaml files for CDF toolkit

  • January 20, 2025
  • 7 replies
  • 133 views

Hello Team,

Is there any utility to convert GraphQL model in CDF to yaml files which can be used in CDF toolkit for deployment.

Currently, even after taking dump using SDK, we need to change the format of YAML as per the supported syntax. 

Thanks,

Snehal,

    Best answer by Anders Albert

    You can download model using Toolkit with the `cdf dump datamodel` command. That will give you the YAML format that is compatible with Toolkit.

    7 replies

    Anders  Albert
    Expert ⭐️⭐️⭐️⭐️
    Expert ⭐️⭐️⭐️⭐️
    January 20, 2025

    You can download model using Toolkit with the `cdf dump datamodel` command. That will give you the YAML format that is compatible with Toolkit.

    APSHANKAR Sagar
    Seasoned ⭐️⭐️
    Seasoned ⭐️⭐️
    January 20, 2025

    Is there a way to copy also the data present in the views of the model while we do this? I tried, successfully to download the model as a bunch of yamls but I also need to reproduce the data, preferably after making some changes in the content.

    Anders  Albert
    Expert ⭐️⭐️⭐️⭐️
    Expert ⭐️⭐️⭐️⭐️
    January 20, 2025

    No sorry, not at this stage. You would have to write your own script to do that, for example, using the python SDK.

    Seasoned ⭐️⭐️⭐️
    January 24, 2025

    Thanks, this works

    Seasoned ⭐️⭐️⭐️
    January 24, 2025

    Also, I see this is available for Datamodel, asset and timeseries.  Any plan to make it available for other resources like groups, transformations, workflows etc

    Architect
    January 24, 2025

    Yes, we plan to enable it for (nearly) all resource types. 

    Seasoned ⭐️⭐️⭐️
    January 24, 2025

    Thanks, it will help alot.