0
votes
4answers
41 views

Using Python to insert in MySQL database, but gets stuck on commas in data

The Python code I have looks like this f = open('data.tsv', 'r') for line in f: a = line.split("\t") e_id = a[1] name = a[2] start = a[3] end = a[4] loc = a[5] tags = ...
0
votes
0answers
16 views

Alembic detects changes but produces empty migration with --autogenerate

I'm trying to get alembic working auto-producing migrations with the --autogenerate flag. When I run alembic -n mydbname --autogenerate -m "my message" I get something like: INFO ...
0
votes
1answer
21 views

Openshift django-mysql database contains no table?

on localhost django automatically creates some table in the database, how to do the same on openshift server, I have even alter deploy script, even then it creates no table in the database.
0
votes
1answer
34 views

Python MySQL Update taking 10-12 seconds to update about 1000 records

I have something along the lines of: while True: variables are set - Each loop the variables are different. sql = sql statement with above variables send sql to MySQL server I am able ...
3
votes
1answer
21 views

how can i ensure innodb thread safety

I have an InnoDB table which lists a bunch of files which need to be processed. The python script which handles the processing basically does this: get next file which has status = 'unprocessed' ...
0
votes
1answer
30 views

MySQL dymanic query in Python

Can anyone tell me the proper way in which I can execute dynamic MySQL queries in Python? I want to do dynamic queries for both CREATE and INSERT statement. I have referred another post here: MySQL ...
0
votes
1answer
15 views

Trouble with ERROR 1146 in MySQL

So I'm doing a basic MySQL tutorial using Python and I first used the following code to create a simple database. import MySQLdb as mdb con = mdb.connect('localhost', 'testuser', 'test623', ...
0
votes
1answer
36 views

Remote query in MySQL using python

How can I query a remote MySQL database, write a select query and insert into my local mysql database using python?
0
votes
1answer
63 views

Import Specific Column Data into Different MYSQL Tables from CSV using Python

I have a csv file with many columns and I want to import two to one table, ten to another, and ten to another still. How could I modify the code below to be selective like that? I was thinking of ...
1
vote
1answer
20 views

Issue getting csv data into mysql table with python and mysqldb

I've been fighting with this python code for a while and getting various errors when I try to execute. import csv import MySQLdb # open the connection to the MySQL server. # using MySQLdb mydb = ...
-1
votes
1answer
32 views

Update rows in Mysql [closed]

I am trying to update data in MySQL DB but it is throwing error: UPDATE scrapedDataTable SET productDesc=, ...
2
votes
2answers
59 views

MySQL not accepting executemany() INSERT, running Python from Excel (datanitro)

I HAVE ADDED MY OWN ANSWER THAT WORKS BUT OPEN TO IMPROVEMENTS After seeing a project at datanitro. I took on getting a connection to MySQL (they use SQLite) and I was able to import a small test ...
1
vote
1answer
27 views

Python MySQL Syntax Error - DUPLICATE KEY UPDATE

I have the following MySQL + Python code: data = json.loads(decoded_response) insert_values = [] cursor = cnx.cursor() add_data = """INSERT INTO pb_ya_camps (camp_id,camp_name) VALUES (%s,%s) ON ...
1
vote
2answers
46 views

Django - When is a query made?

I want to minimize the number of database queries my application makes, and I am familiarizing myself more with Django's ORM. I am wondering, what are the cases where a query is executed. For ...
0
votes
1answer
28 views

Mysql Creating a Foreign key

I need to create a foreign key for my Reviewers_POS table. I have the Reviewers_Id as my Primary key, and i want to pass it to my id_r1 from Reviewrs_POS table.. import MySQLdb as mdb import ...

1 2 3 4 5 163
15 30 50 per page