Does the id have to be a UUID?
batch.add_data_object(
properties,
"class_name",
uuid=entity.id,
)
How can I use a none-UUID string as an id?
Does the id have to be a UUID?
batch.add_data_object(
properties,
"class_name",
uuid=entity.id,
)
How can I use a none-UUID string as an id?
Hi @Shaimaa.Sabry !!
You cannot add invalid uuid to an object.
if you are looking to have deterministic IDs, meaning, the same id for the same object, so you can reference it later, correlating that to your existing ID, you can do so like:
batch.add_data_object(
properties,
"class_name",
uuid=weaviate.util.generate_uuid5(entity.id),
)
By doing that, you will always get the same UUID for you entity.id variable
Check here for more information on that:
Let me know if that helps
Thanks!