Source MongoDB: transfer _id
fields as string not UUID
#11681
Labels
autoteam
community
connectors/source/mongodb-v2
frozen
Not being actively worked on
team/db-dw-sources
Backlog for Database and Data Warehouse Sources team
type/enhancement
New feature or request
I'm migrating from mongoDB database to postgresql, I have several cases that a mongoDB object in postgresql will be more than a table.
In the process of migrating, I need to do some transformations and also be able to insert the value into a table, get the generated _id UUID and assign it to another table.
In the example in the image below, I try to demonstrate this.
I have an order object, in it I have customer and order details.
After migrating to postgresql, there will be two tables, 1 for the person and 1 for the order.
However, when migrating, it is necessary to create the record in the person table, retrieve the created _id and then create the record in the order table, also inserting the person's _id as a foreign key.
another challenge is to create a function that formats an old mongo _id into UUID, example:
Mongo id:
6248ae64b650c7fd1e041188
_id after parsing to UUID:
00000000-6248-ae64-b650-c7fd1e041188
I need to know how to include these transformations in the pipeline and how to insert in one table wait and insert in another.
The text was updated successfully, but these errors were encountered: