EPFImporter creates table but imports nothing

You can get it to work by altering EPFIngester.py according to:

  1. Find function

    def _populateTable(self, tableName, resumeNum=0,
    isIncremental=False, skipKeyViolators=False):
    
  2. In the function, within the while loop, find row:

    cur = conn.cursor()
    
  3. Under it insert:

    cur.connection.autocommit(True)
    

The altered source should look like:

...
cur = conn.cursor()
cur.connection.autocommit(True)
colVals = unicode(", ".join(stringList), 'utf-8')
....

The EPFImporter was made in 2010. At the time, the latest version of MySQLdb set autocommit to true. The version of MySQLdb you are using is most likely a newer version where autocommit is set to false.

Tags:

Python

Mysql