Skip to main content
Question

Containers, Spaces and Instances

  • July 11, 2025
  • 1 reply
  • 34 views

Marwen TALEB
MVP

I have the following question regarding Containers,  Spaces and Instances. Let's say I have a Container named Well in the space A and all its instances are created in space B.

 

When I delete container Well in space A and recreate it (because I want to change a column name for example):

  • Does instance in space are deleted as well?

  • If they are not deleted, If I rerun the transformation to populate the new container again in space with the new schema (same external_id) what state should I expect my instances to be in ? A merge of old and new schema?

  • What is the best practice ? To delete container in its space and its instances in all spaces also?

Thank you! 

 

1 reply

Hi ​@Marwen TALEB ,  

When I delete container Well in space A and recreate it (because I want to change a column name for example):

  • Does instance in space are deleted as well?

No, deleting a container does not delete the instance, but it will delete all data stored in that container for the instance. This means that if you had data populated in several containers for an instance, deleting a single of those containers will only delete data stored for that instance in that container and not the data stored in any of the other containers or the instance itself.

 

What is the best practice ? To delete container in its space and its instances in all spaces also?

That depends on what you are trying to accomplish: if you for example want to rename a property in a container by deleting and recreating a container and you do not care about the old data in that container being deleted (for example if you can repopulate it fully from some external source) I would recommend simply deleting the container without deleting any of the instances and repopulating the instances after deleting it. In this case any data from the old container will disappear without you needing to delete it manually from every instance. (But note any data stored for the instance in other containers will remain)

 

To illustrate how instances with data in multiple containers behave I have added this example:

Say I have two containers

Container “A” with a string property “Astring”

Container “B” with a string property “Bstring”

Both of these containers are in the space called “space1”

Lets say I populate data into both of these containers for an instance with external id “myInstance” in space “space2” such that that querying for this instance and the data it has stored in both containers result in:

{ “externalId”: “myInstance”, “space”: “space2”, “Astring”: “data”, “Bstring”: “data” }

 

If I now delete container “A” in “space1”, the data stored in container A for “myInstance” is lost, however the data stored in container “B” remains, querying for it at this point would give me:

{ “externalId”: “myInstance”, “space”: “space2”, “Bstring”: “data” }

notice that the Astring property is gone as the container no longer exists.

If I were to recreate container A now and query for “myInstance” you can now query for the property “Astring”, but its data will be wiped, resulting in a null value for “myInstance”

{ “externalId”: “myInstance”, “space”: “space2”, “Astring”: null, “Bstring”: “data” }

Notice that deleting and recreating the “A” container did not delete the instance or its data stored in other containers. (Ie. the “Bstring” property remains the same)

 

It follows from this example that if an instance only has data in a single container, deleting the container will effectively delete all data for the instance.