Why is the default mapping of TINYINT to Boolean in MySQL?

One Star

Why is the default mapping of TINYINT to Boolean in MySQL?

Hi All,
I'm loading Data MySQL to MySQL.In source one filed datatype is TINYINT,in Talend by default it's taking Boolean data type.
Talend doesn't support TINYINT datatype?
Regards,
kumar
Seventeen Stars

Re: Why is the default mapping of TINYINT to Boolean in MySQL?

hi,
TINYINT is a DB type. Talend has a default behavior defined by data xml file  mapping (metadata of talend type).
@see window => preferences => specific setting
its tell us :
<dbType type="TINYINT">
                    <talendType type="id_Byte" default="true" />
                    <talendType type="id_Integer"/>
                    <talendType type="id_Long"/>
                    <talendType type="id_Short"/>
                </dbType>

db Type To java type (talend).
but it's the default behavior.
regards
laurent
One Star

Re: Why is the default mapping of TINYINT to Boolean in MySQL?

so i ended up trying to changed the default in the xml file to:
 <dbType type="TINYINT">
 <talendType type="id_Short"  default="true"/>
 <talendType type="id_Integer"/>
 <talendType type="id_Long"/>
 </dbType>

restarted my studio and then tried to see if the default mapping changed ... and it still doesn't for me - what am i doing wrong?
Community Manager

Re: Why is the default mapping of TINYINT to Boolean in MySQL?

Hi hansolo
After you change the mapping setting, try to retrieve a table schema that contains a field with TINYINT type, you will see the DB type is "Short".

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Why is the default mapping of TINYINT to Boolean in MySQL?

nope - that did not happen for me.  
Community Manager

Re: Why is the default mapping of TINYINT to Boolean in MySQL?

Which version are you using? If it does not display the right db type, try to click the Retrieve Schema button again.
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Why is the default mapping of TINYINT to Boolean in MySQL?

i am using Version: 5.5.1
Build id: r118616
hitting that button doesn't help for me.
Community Manager

Re: Why is the default mapping of TINYINT to Boolean in MySQL?

I tested it in v6.0 and it works, maybe it was a bug on v5.5.1, I would suggest you to test it also in the latest versions. 
----------------------------------------------------------
Talend | Data Agility for Modern Business