mongoDB에 Powershell 통해서 JSON import 하는건 CSV랑 거의 비슷하다.
명령어가 조금 달라짐...
$params = '--db', '[DB 이름]', '--collection', '[Collection 이름]', '--type', 'json', '--jsonArray', '--file', '[json 파일 이름]'
mongoimport $params
CSV 파일에는 각 데이터가 ,
로 구분되고 그 데이터들이 뭘 의미하는지 나타내는 헤더가 있었다.
그 헤더를 위해 사용되던 옵션인 --headerline
이 삭제되었다.
--jsonArray
옵션은 Failed: cannot decode array into a primitive.D 에러 때문에 추가되었다.