Skip to content

Commit

Permalink
Actually, the problem is not fully on our end, it's Airbyte's default…
Browse files Browse the repository at this point in the history
… type conversion on the Destination connector for BigQuery. Rolled back bigint change, but kept tinyint adjustment.
  • Loading branch information
lizztheblizz committed Oct 17, 2023
1 parent 64138af commit 7871fc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/internal/planetscale_edge_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func getJsonSchemaType(mysqlType string, treatTinyIntAsBoolean bool) PropertyTyp
}

if strings.HasPrefix(mysqlType, "bigint") {
return PropertyType{Type: "integer", AirbyteType: "big_integer"}
return PropertyType{Type: "string", AirbyteType: "big_integer"}
}

if strings.HasPrefix(mysqlType, "datetime") {
Expand Down
6 changes: 3 additions & 3 deletions cmd/internal/planetscale_edge_database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,17 @@ func TestDiscover_CanPickRightAirbyteType(t *testing.T) {
},
{
MysqlType: "bigint(16)",
JSONSchemaType: "integer",
JSONSchemaType: "string",
AirbyteType: "big_integer",
},
{
MysqlType: "bigint unsigned",
JSONSchemaType: "integer",
JSONSchemaType: "string",
AirbyteType: "big_integer",
},
{
MysqlType: "bigint zerofill",
JSONSchemaType: "integer",
JSONSchemaType: "string",
AirbyteType: "big_integer",
},
{
Expand Down

0 comments on commit 7871fc4

Please sign in to comment.