Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
0 answers
58 views

Django migration script to add metadata

I made a simple django migration that adds two field to our Invoices model : first_payment and first_paying_month. ...
Taek's user avatar
  • 131
4 votes
0 answers
112 views

Interacting with PostgreSQL attachment and the file system

I have just migrated from Python 2 to Python 3. I have written the following script to fetch all records of a table, ir_attachment, from PostgreSQL. After fetching all the records I check following ...
Ibrahim Rahimi's user avatar
1 vote
1 answer
210 views

Reading employee data from a PostgreSQL database

I have developed this script to read employee_language table records of a PostgreSQL database using Python 2 (due to some OS limitation). I want to find duplicate ...
Ibrahim Rahimi's user avatar
3 votes
1 answer
69 views

Python script to find employees who are in one PostgreSQL table but not in another

I'm writing a python script and do database query to get the ids of employees who are in one table but are not in another. I'm using psycopg2 module for python 2 and PostgreSQL as database. After ...
Ibrahim Rahimi's user avatar
2 votes
1 answer
803 views

Parsing data from big json field and geocode services then store to PostgreSQL using psycopg2 instead django-orm

This code works, but my boss told me that it's very bad code, and don't want to deploy it. It is my first time working as a programmer and I have at least 3 months of experience. ...
kAldown's user avatar
  • 131
2 votes
2 answers
2k views

Database migration script

I'm working on a database migration script written in python, which will take data from a MySQL database and insert them into a PostgreSQL database with a different Schema (different table structures, ...
lese's user avatar
  • 145
5 votes
2 answers
4k views

Loading 40GB twitter JSON TAR file from archive.org and load into PostgreSQL

I wrote the script below to load data obtained from the twitter JSON archive on archive.org into a PostgreSQL database. I'm looking for optimizations in the code. It currently runs at ~1.7 seconds ...
MattV's user avatar
  • 698