Skip to main content
Question

Is it possible to input string column of OracleDB into mongodb in json format?

  • April 27, 2020
  • 1 reply
  • 10 views

I have an OracleDB table with the following varchar type column.

This looks like json but is recognized by fme as string type by default.

 

 

I want to enter this column in mongodb in nested json format.

I want it to be entered in the format below.

Can the fme workbench do this?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

virtualcitymatt
Celebrity
Forum|alt.badge.img+47

So it looks like FME's MongoDB writer does support writing nested attributes.

 

From the doc

 

 

"MongoDB documents may contain nested documents. For the reader, the fields in nested documents are represented as attributes with a period (.) in the name, in the form of: <nested_document_name>.<nested_document_field>. The writer treats these attributes the same way. If an attribute name contains a period, then it will be written as a nested field. "

 

 

So if you use a JOSNFlattener to recursively flatten the json attribute from the Oracle db you should get the something close to the correct structure to write into the mongoDB.

 

I'm not sure how would do it in a dynamic way though. Seems like you may need to expose each element...that would be pretty bad though.

 

 

Give it a test out