mongodbgoogle-bigquery

how to do mongo export to json without type


My high level purpose is to export mongo data to Bigquery so I could do data analysis.

I don't want to export as csv because doing so requires me to specify fields to export manually.

However, mongoexport to json will have these type data like

"registerTimestamp":{"$numberLong":"1429594506335"}

This tpye $numberLong really messes up my bigquery import. Error message like:

Errors: query: Illegal field name: $numberLong

I don't find a way to export mongo without type. How to solve this export to bigquery problem....


Solution

  • I end up exporting CSV and take it from there.