Hi folks,
I’ve started looking into Relational Migrator as an ETL tool to bring data from an existing MariaDB into an AtlasDB environment. The existing data in MariaDB is already somewhat denormalized: It all lives in one table. I would like to map that to a document schema where certain columns then form an embedded object.
As a fictional example, let’s say the relational table holds data of tactical units, including e.g. their geographical deployment. Like so:
id | unit_name | image_1 | image_2 | image_3 | latitude | longitude | deployment_date |
---|---|---|---|---|---|---|---|
1 | Alpha | img1.jpg | img2.jpg | img3.jpg | 34.05 | -118.25 | 2024-08-04 |
2 | Bravo | img4.jpg | img5.jpg | img6.jpg | 40.71 | -74.01 | 2024-08-05 |
And I would like to group values of the columns pertaining to the geography details into an embedded object, and image related data into an embedded array.
So the target structure would resemble this:
{
"_id": ObjectId("..."),
"unit_name": "Alpha",
"image_gallery": ["img1.jpg", "img2.jpg", "img3.jpg"],
"deployment": {
"location": {
"latitude": 34.05,
"longitude": -118.25
},
"date": "2024-08-04"
}
}
It looks to me so far that the relational migrator allows such mappings, but only if the source data comes from different relational tables.
What would be the preferred approach to achieve this ETL task?
Thanks for some guidance
Patrick