seanharr11 / etlalchemy

Extract, Transform, Load: Any SQL Database in 4 lines of Code.
MIT License
556 stars 83 forks source link

sqlalchemy.exc.InternalError:(pymysql.err.InternalError) (1170, u"BLOB/TEXT column ' ' used in key specification without a key length") #36

Open osman-siddiqui opened 6 years ago

osman-siddiqui commented 6 years ago

Hi I'm trying to pull data from aact , but i am getting an error


from etlalchemy import ETLAlchemySource, ETLAlchemyTarget

pg_source = ETLAlchemySource("postgresql://user:pass@aact-db.ctti-clinicaltrials.org/aact")
mysql_target = ETLAlchemyTarget("mysql+pymysql://user:pass@server-ip/AACT_2018_06_09")
mysql_target.addSource(pg_source)
mysql_target.migrate()

it creates all the tables , but there is an error and it doesn’t insert any data.

sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1170, u"BLOB/TEXT column 'nct_id' used in key specification without a key length") [SQL: u'CREATE INDEX `IDX_calculated_values__nct_id__1` ON calculated_values (nct_id)']

help will be greatly appreciated.

Thanks