How to delete a Project without deleting the Project group via API

I have a UAT_PRJECTGROUP with a UAT_PROJECT within. I need to deploy me DEV Project to UAT and therefore need to delete the UAT_PROJECT before. Whenever I delete it, the Projectgroup gets deleted as well. How to only delete the project not the project group.

All of this via API

 

Thanks

 

BR

 

Steve

Hi @Steve​ ,

Currently this is not possible. Although this should be requested. In the older product versions there were virtually no artifacts in the project Group after you deleted the last project. Therefore it made sense to just delete the group as well since the next time you created a project you would create the group as well.

This has changed over time with the addition of features like the password store which live at the group level. We are not in position that we have more artifacts that live at the group level that you don't want to lose when you delete the last project out of a group. I will submit this as an idea. I believe that the depth at which that piece of functionality is embedded into the core Matillion product will determine how fast it get's implemented into the product. I hope this helps in some way.

@Bryan​ Thanks for the confirmation. Thats what I was Thinking as well, just hoped there is a trick I didn't stumbled upon yet. I fixed it for us by exporting the project group and jq the json to adjust the required parameters before importing. Would have been nice to get this from matillion directly, now its ten lined bash and works.

Yeah, I hear you on that. We wrote a custom export and import Python script to handle our deployments because when we deploy to our Production instance of Matillion we only deploy a specific version and project environment. I have included the Python export script file in case you find it valuable in some way. I also have the import script file if you are interested as well. Take care!

@Bryan​ Thanks a lot for your suggestions and the script

Hi Bryan,

We are experimenting with export and import processes via API. Thanks for sharing the export script. I would also be interested in the import script if you are willing to share that. Do you run the script from github actions, so it autodeploys updates?

Attached is the import script. We currently do not run the script via Github Actions but I could see how you could leverage that. My initial thought be to create a Production branch where you would do a pull request from the mast to the Production branch which would fire the GitHub action and call the export and import scripts to deploy a production instance.

 

Depending on the cloud provider you are using and how the infrastructure is setup, there may need to be some extra configuration needed to allow GitHub the ability to connect to the Matillion instance(s). I like the thought of leverage GitHub actions though.