I am trying to extract data from MongoDB and write back it to Postgres. The following script works fine but string inserting as individual character which contains multiple entry.
For example: Instead of
'Apple' its inserting 'A', 'P', 'P' ,'L' ,'E'
for line in results:
name = line['name']
cur.execute("""INSERT INTO xyz(Column1) VALUES('%s')""" % \
(line['name']))