Replies: 2 comments 1 reply
-
Could you clarify, are you trying to add a new struct column, or are you trying to add a new column within an existing struct column? An example of the schema before and after would help clarify. |
Beta Was this translation helpful? Give feedback.
0 replies
-
let's say we have a table with the following initial schema: class InitialSchema(LanceModel):
field1: Field1Type
field2: Field2Type Latter we want to add a new column to an existing table with type Field3type, so the final schema will become class FinalSchema(LanceModel):
field1: Field1Type
field2: Field2Type
field3: Field3Type How to migrate from the first table to the second one without loosing the data knowing that field3 maybe sparse. which means same row in the original table may have a not defined field3 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
Lancedb is really a game changing for us and we would like to thank lancedb team for their effort.
In our tool for image data exploration and annotation https://github.com/pixano/pixano we heavily use lancedb in the backend.
One use case that we are facing is adding new column to an existing table. Precisely, we have a table with object annotation with bounding box column in it. We want to annotate keypoints in a new version of the dataset. In this case we need to update the table schema. Usually, the type of the annotation are based on struct not a primitive type. This can somehow causes issue with pyarrow.
What is the best way to handle this if we want to keep it in lancedb level without going down to lance or pyarrow ?
Beta Was this translation helpful? Give feedback.
All reactions