Showing posts with label import. Show all posts
Showing posts with label import. Show all posts

Thursday, February 28, 2019

How to import csv data into mongodb?

How to import large amount of csv data to mongodb
mongoimport -d <dbname> -c <collection_name> --type csv --file </path/to/actual/file.csv> --headerline

<blah> - Replace with your respective values

-d <dbname> - Tells to your mongo server into which database you want to import
-c <collection_name> - Tells to your mongo server in <dbname> into which collection you want to import
--type csv - Says it is a csv file
--file <path> - Give full path to your csv file
--headerline - if given, uses the first line as field names.

Monday, November 12, 2018

How to fix "Use gi.require_version('Gtk', '3.0') before import" error

Error:

gi.require_version error









Solution:

Replace the line
"from gi.repository import Gtk"

with

"import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk "