BSON Extract

Support/help with CloverETL (4.9) and CloverDX (5.0 or newer) implementation problems

lookatmyname
Posts: 1
Joined: Thu Aug 05, 2021 4:34 pm

BSON Extract

Postby lookatmyname » Thu Aug 05, 2021 4:37 pm

A client recently sent me a large BSON file, exported from MongoDB. What is the best solution to extract this data? There are some updates that mention BSON support, but I can't seem to find any resources on this. The only idea I have so far is to load it into a local mongodb and try to connect via the mongo connector. Please advise, and thanks in advance!

szabol
Posts: 3
Joined: Mon May 10, 2021 10:38 am

Re: BSON Extract

Postby szabol » Fri Aug 06, 2021 3:35 pm

Hello there,

I can see a simple way how to do this. All you need is the FlatFileReader and the Reformat components to parse the BSON file.
1. Read the BSON file with the FFR as binary data.
2. Parse the BSON in the Reformat with parseBson function. (https://doc.cloverdx.com/latest/designer/conversion-functions-ctl2.html#ctl2-parseBson)

Now you can work with the data as a variant. However, I would recommend using parseJson (https://doc.cloverdx.com/latest/designer/conversion-functions-ctl2.html#ctl2-parseJson) function to transform data into the JSON format. By doing this, you can now use the JSONExtract or the JSONReader components to extract the data.

I've attached a solution with a simple graph utilizing this component.
Attachments
bson_example_solution.zip
(2.07 KiB) Downloaded 351 times
---
Ladislav Szabo
CloverCARE Support
CloverDX

Visit us online at http://www.cloverdx.com