# How to remove reference property

**URL:** <https://forum.weaviate.io/t/how-to-remove-reference-property/9600>\
**Category:** Support\
**Created:** [January 7, 2025, 7:55am UTC](https://forum.weaviate.io/t/how-to-remove-reference-property/9600 "2025-01-07T07:55:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_Mahmoud](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ahmed_mahmoud/32/2494_2.png) [@Ahmed\_Mahmoud](https://forum.weaviate.io/u/Ahmed_Mahmoud)\
**Post date:** [January 7, 2025, 7:55am UTC](https://forum.weaviate.io/t/how-to-remove-reference-property/9600/1 "2025-01-07T07:55:21Z")

</div>

we have added the following ref property, now wondering how to remove it without recreating the collection and losing data.

from weaviate.classes.config import ReferenceProperty

category = client.collections.get(“Rechtspraak\_nl”)  
category.config.add\_reference(  
ReferenceProperty(  
name=“extracted\_content\_outline”,  
target\_collection=“Rechtspraak\_nl\_metadata”  
)  
)

so is there a way using python client to remove this refrence ?

---

<div class="post-metadata">

**Author:** ![Dirk](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dirk/32/46_2.png) [@Dirk](https://forum.weaviate.io/u/Dirk)\
**Post date:** [January 7, 2025, 9:54am UTC](https://forum.weaviate.io/t/how-to-remove-reference-property/9600/2 "2025-01-07T09:54:28Z")

</div>

Hello!

Removing properties (data and references) is not possible. You’d have to create a new collection and transfer your data over. Or simply ignore that the reference property is there

---

<div class="post-metadata">

**Author:** ![Ahmed\_Mahmoud](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ahmed_mahmoud/32/2494_2.png) [@Ahmed\_Mahmoud](https://forum.weaviate.io/u/Ahmed_Mahmoud)\
**Post date:** [January 7, 2025, 10:21am UTC](https://forum.weaviate.io/t/how-to-remove-reference-property/9600/3 "2025-01-07T10:21:15Z")

</div>

Thanks for the fast reply.

## How to transfer your data over from one collection to another , is it easy ?

**Or simply ignore that the reference property is there**  
I wish to ignore it, however, I am currently getting error when appending to the schema getting the following error:

code to append:  
to\_add.withColumnRenamed(“id”, “uuid”)   
.write.format(“io.weaviate.spark.Weaviate”)   
.option(“batchSize”, 200)   
.option(“scheme”, “http”)   
.option(“host”, weaviate\_url)   
.option(“id”, “uuid”)   
.option(“grpc:host”, “10.2.0.13:50051”)   
.option(“grpc:secured”, “false”)   
.option(“className”, schema[‘class’])   
.mode(“append”).save()

Error:  
[INCOMPATIBLE\_DATA\_FOR\_TABLE.CANNOT\_FIND\_DATA] Cannot write incompatible data for the table `Rechtspraak_nl`: Cannot find data for the output column `ecli_uuid`. SQLSTATE: KD000

Diagnose errorHighlight error

And the schema have 2 references that we added recently :

“references”: [  
{  
“name”: “ecli\_uuid”,  
“description”: null,  
“target\_collections”: [  
“Rechtspraak\_nl\_metadata”  
]  
},  
{  
“name”: “extracted\_content\_outline”,  
“description”: null,  
“target\_collections”: [  
“Rechtspraak\_nl\_metadata”  
]  
}  
],

---

<div class="post-metadata">

**Author:** ![Ahmed\_Mahmoud](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ahmed_mahmoud/32/2494_2.png) [@Ahmed\_Mahmoud](https://forum.weaviate.io/u/Ahmed_Mahmoud)\
**Post date:** [January 7, 2025, 11:02am UTC](https://forum.weaviate.io/t/how-to-remove-reference-property/9600/4 "2025-01-07T11:02:54Z")

</div>

should we add 2 empty columns for the 2 references in the datafram when writing to weaviate ?

---

<div class="post-metadata">

**Author:** ![Dirk](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dirk/32/46_2.png) [@Dirk](https://forum.weaviate.io/u/Dirk)\
**Post date:** [January 7, 2025, 12:56pm UTC](https://forum.weaviate.io/t/how-to-remove-reference-property/9600/5 "2025-01-07T12:56:59Z")

</div>

In the python client you could just leave it out. Not sure about the spark connector, I’ll ping someone 🙂

---

<div class="post-metadata">

**Author:** ![Ahmed\_Mahmoud](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ahmed_mahmoud/32/2494_2.png) [@Ahmed\_Mahmoud](https://forum.weaviate.io/u/Ahmed_Mahmoud)\
**Post date:** [January 7, 2025, 1:32pm UTC](https://forum.weaviate.io/t/how-to-remove-reference-property/9600/6 "2025-01-07T13:32:45Z")

</div>

btw if we have 2 collections  
one for document data (id, chunks) and one for document metadata (id, summery, …)  
we want to connect the collections using references, to avoid duplicating all the metadata for each chunk/row.

in this case we create the reference based on the document unique id or based on the specific fields we need from metadata collection ?

so for example:

from weaviate.classes.config import ReferenceProperty

category = client.collections.get(“document\_data”)  
category.config.add\_reference(  
ReferenceProperty(  
name=“document\_id”,  
target\_collection=“document\_metadata” ) )

or we create the reference based on the specific fields we need :

from weaviate.classes.config import ReferenceProperty

category = client.collections.get(“document\_data”)  
category.config.add\_reference(  
ReferenceProperty(  
name=“document\_summary”,  
target\_collection=“document\_metadata” ) )

And how we insert in different cases ?
