MySql Source Connector type tinyint(1)

Hi!

We were faced with a problem when we were using MySql Source Connector.

In our source, we have a column with type tinyint(1), but it doesn’t mean that values are limited to 0/1. Those values can be in the range of 0…9, but Airbyte’s MySql Connector casts them to boolean (MySQL | Airbyte Documentation) :frowning:

And so we are losing real values(

About MySQL type tinyint: MySQL :: MySQL 8.0 Reference Manual :: 11.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT

It means that

Minimum and Maximum Value Signed = -128…127
or
Minimum and Maximum Value Unsigned = 0…255

And the value in brackets only means the display width.

Maybe there are some solutions to such problems?

Hello please check this Github Discussion: https://github.com/airbytehq/airbyte/issues/10976

From MySQL documentation: https://dev.mysql.com/doc/refman/8.0/en/numeric-type-syntax.html

BOOL, BOOLEANThese types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true.

Hi @coca-alex @marcosmarxm
I had the same problem

@leeco and @coca-alex you can change the connector to work without using the default behavior of Airbyte. Today Airbyte handle this as described in MySQL documentation, maybe in the future can be changed to another way.