添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I have a MySQL database with a heap of TINYINT columns (it's a Moodle Database). Many of these columns have values in the range of 0,1,2

When I use Talend Open Studio 7.4.1 (was same on 6.4 too), it detects these TINYINT columns as BIT/Boolean. In most cases it works as the '2' values are few and far between but in some tables it's a problem. I have been manually modifying the repository schema, changing the columns to Short|SMALLINT as trying to change to Short|TINYINT was throwing errors about dbtype. The problem with this approach is that I have to remember that the schema in the repository isn't the same as the actual schema and if I update the schema from the database at a later date, I might not remember I have to change all those BITS to TINYINT|Short

Today I finally found the solution. The fact that the schema retrieval detects the TINYINT as a BIT is due to a 'feature' in jdbc. There is an option in jdbc to make it detect the column as TINYINT.

To apply this option in Talend, edit your connection details, in Additional Parameters, enter

tinyInt1isBit=false

Now you need to retrieve all your schemas again and the changes will flow thru.

I hope it helps someone