Skip to content

Commit

Permalink
- Remove .pyc and logging file
Browse files Browse the repository at this point in the history
- Change COPY to work correctly
- Added .gitignore
  • Loading branch information
Roshan Sumbaly committed Nov 24, 2015
1 parent aca4f4e commit 36a7fbc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 86 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
*.pyc
8 changes: 7 additions & 1 deletion convert_ondemand.py
Expand Up @@ -128,7 +128,13 @@ def insert_data(self, data_folder, file_):

# Copy data to PostGres table
try:
c.execute("""COPY {} FROM '{}/{}_temp.csv' DELIMITER ',' CSV;""".format(file_, data_folder, file_))
c.execute("""COPY {} FROM '{}/{}_temp.csv'
CSV
DELIMITER ','
NULL ''
QUOTE '"'
ESCAPE '\\'
HEADER;""".format(file_, data_folder, file_))
print "TRUE"
log.logMessage("SUCCESS", "Successfully inserted data from dataset {} into {}.".format(file_, self.database))
conn.commit()
Expand Down
Binary file removed convert_ondemand_config.pyc
Binary file not shown.
85 changes: 0 additions & 85 deletions logging.txt

This file was deleted.

0 comments on commit 36a7fbc

Please sign in to comment.