sqlalchemy-teradata icon indicating copy to clipboard operation
sqlalchemy-teradata copied to clipboard

string always ends up in LONG VARCHAR

Open steppel opened this issue 6 years ago • 1 comments
trafficstars

I define the datatypes to create a table. When using string(100) it will end up in LONG VARCHAR. I do have multiple VARCHAR columns and now it always ends in teradata [Error 3933] [SQLState HY000] The Maximum Possible Row Length in the Table is too Large.

datatypes = { 'example':sqlalchemy.types.String(100) -> LONG VARCHAR ... } final_table.to_sql('test',td._backend._conn,schema='test',index=False,dtype=datatypes,if_exists='replace')

steppel avatar Jun 05 '19 04:06 steppel

@steppel You should use teradatasqlalchemy which will succeed sqlalchemy-teradata. There is also a tutorial in the wiki section that points to docs on sql data types: https://github.com/wiskojo/sqlalchemy-teradata/wiki/Data-Types#tldr

sandan avatar Oct 14 '19 16:10 sandan