问题 将DataFrame数据保存到mysql中时,出现错误提示: BLOB/TEXT column used in key specification without a key length 原因 出问题的原因是DataFrame对象索引的数据类型是TEXT/BLOB或其从属的类型,当将其作为mysql中的主键的时候,如果这些数据类型缺少明确的长度值,mysql无法保证主键的唯一性,因为这个主键是一个变量,其长度是动态的.所以当使用 TEXT/BLOB类型的数据作为索引的时候,数据的长度必须…
[DTF] Data Transfer 企管宝_2_CRM start[DTF] Getting tables[DTF] Analyzing table: `CustomerInfo`[DTF] Get table data for [CustomerInfo][DTF] Drop table: `CustomerInfo`[DTF] Create table: `CustomerInfo`[ERR] 1170 - BLOB/TEXT column 'CustomerName' used in…
今天有开发反应他的建表语句错误,我看了下,提示: MySQL Error 1170 (42000): BLOB/TEXT Column Used in Key Specification Without a Key Length 原因是: MySQL不允许在BLOB/TEXT,TINYBLOB, MEDIUMBLOB, LONGBLOB, TINYTEXT, MEDIUMTEXT, LONGTEXT,VARCHAR建索引,因为前面那些列类型都是可变长的,MySQL无法保证列的唯一性,只能在BLO…
问题 1. 将DataFrame数据保存到mysql后,添加索引出现错误提示: BLOB/TEXT column used in key specification without a key length 2. mysql> CREATE INDEX credit_creditchannel_parse_h_index ON credit_creditchannel_parse_h(custid); - BLOB/TEXT column 'custid' used in key specifi…
官方的解释: The error happens because MySQL can index only the first N chars of a BLOB or TEXT column. So The error mainly happen when there is a field/column type of TEXT or BLOB or those belongs to TEXT or BLOB types such as TINYBLOB, MEDIUMBLOB, LONGBL…