I have a table(in mysql-server) associated with the following class:
class Number(Base):
__table_name__ = 'number'
col0 = Column(...) # PRIMARY KEY
col1 = Column(...)
col2 = Column(...)
col3 = Column(...)
I want to create a temporary table for this number table when the program starts, this temporary table looks like:
class tempNumber(Base):
__table_name__ = 'temp_number'
col0 = Column(...) # direct from Number.col0
col1 = Column(...) # from Number.col1, but will be modified, for example tempNumber.col1 = Number.col1.replace(' ','')
I also tried to add the following line to class Number:
__table_args__ = {'prefixes': ['TEMPORARY']}
but my python programm told me that table temp_number doesn't exist.
and one more question is, how to copy the data fast? because there are lots of rows in table number.